function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Sourabh Tayal 5Sourabh Tayal 5 

how to display label for checkbox in <apex:facet> dynamically?

I am using pahe block table and in this i am using :

<apex:repeat value="{!WrapCls}" var="obj">
            <apex:column width="20">
                    <apex:facet name="header" >
<apex:inputCheckbox value="{!obj.BoLn}" title="{!obj.Acct.Name}" label="{!obj.Acct.Name}"/>
                </apex:facet>
                                   {!obj.Acct.Name}    
            </apex:column>
</apex:repeat>

here in header checkbox is comming but its label is not comming.
What could be the issue, please help me regarding this.
Abhinav GuptaAbhinav Gupta
Try printing the label out i.e. 

<apex:facet name="header" >
	<apex:inputCheckbox value="{!obj.BoLn}" title="{!obj.Acct.Name}" label="{!obj.Acct.Name}"/> {!obj.Acct.Name}
</apex:facet>


Arun KumarArun Kumar
Hi Sourabh,

Try below code
<apex:repeat value="{!WrapCls}" var="obj">
            <apex:column width="20">
                    <apex:facet name="header" >


<apex:outputPanel layout="none">                            
                            
<apex:inputCheckbox value="{!obj.BoLn}" title="{!obj.Acct.Name}" label="{!obj.Acct.Name}"/>
<apex:outputText value="   {!obj.Acct.Name} "/>
                </apex:facet>
                            
                        </apex:outputPanel>



                                 
            </apex:column>
</apex:repeat>
 
<apex:repeat value="{!WrapCls}" var="obj">
            <apex:column width="20">
                    <apex:facet name="header" >
<apex:inputCheckbox value="{!obj.BoLn}" title="{!obj.Acct.Name}" label="{!obj.Acct.Name}">{!obj.Acct.Name} 
</apex:inputCheckbox>
                </apex:facet>                                    
            </apex:column>
</apex:repeat>