You need to sign in to do that
Don't have an account?
Shephali Swarnkar
wrapper with radio/option button
This is my VF code displaying the records with checkbox at front. i need to display this list with radio/options so that user can select only option.how to do this??
<apex:pageBlockSection columns="2">
<apex:pageBlockTable value="{!wrapcontactList}" var="waccl">
<apex:column >
<apex:facet name="header">
<apex:inputCheckbox />
</apex:facet>
<apex:inputCheckbox value="{!waccl.isSelected}" id="InputId"/>
</apex:column>
<apex:column value="{!waccl.accn.name}"/>
<apex:column value="{!waccl.accn.phone}"/>
</apex:pageBlockTable>
<apex:pageBlockSection columns="2">
<apex:pageBlockTable value="{!wrapcontactList}" var="waccl">
<apex:column >
<apex:facet name="header">
<apex:inputCheckbox />
</apex:facet>
<apex:inputCheckbox value="{!waccl.isSelected}" id="InputId"/>
</apex:column>
<apex:column value="{!waccl.accn.name}"/>
<apex:column value="{!waccl.accn.phone}"/>
</apex:pageBlockTable>
Please use the below code:
<apex:pageBlockSection>
<apex:pageBlockTable value="{!wrapcontactList}" var="waccl">
<apex:column >
<apex:facet name="header">
Is Selected
</apex:facet>
<input type="radio" name="accSelected" id="{!waccl.vAcc.Id}" />
</apex:column>
<apex:column value="{!waccl.vAcc.name}"/>
<apex:column value="{!waccl.vAcc.phone}"/>
</apex:pageBlockTable>
</apex:pageBlockSection>
Please let me know if it will work for you.
Thanks,
Vishal
All Answers
Please use the below code:
<apex:pageBlockSection>
<apex:pageBlockTable value="{!wrapcontactList}" var="waccl">
<apex:column >
<apex:facet name="header">
Is Selected
</apex:facet>
<input type="radio" name="accSelected" id="{!waccl.vAcc.Id}" />
</apex:column>
<apex:column value="{!waccl.vAcc.name}"/>
<apex:column value="{!waccl.vAcc.phone}"/>
</apex:pageBlockTable>
</apex:pageBlockSection>
Please let me know if it will work for you.
Thanks,
Vishal
Its working!!