I am trying to create Radio Button using <apex:repeat>
and in {!recordList}
i have 7 records so it will create 7 Radio Buttons. But the problem is that all 7 Buttons are getting Selected and i want only one at a time.
Someone told me that you can use <apex:repeat>
after <apex:selectRadio
so radio list will be one 1 and have 7 options but in that case what will be the value of <apex:selectRadio>
because i need this Id to perform some functioning
VF Page
<apex:repeat value="{!recordList}" var="rep">
<apex:selectRadio id="isRadio" value="{!rep.isSelected}">
<apex:selectOptions value="{!items}" />
</apex:selectRadio>
</apex:repeat>
Controller
public List<SelectOption> getItems() {
List<SelectOption> options = new List<SelectOption>();
options.add(new SelectOption('true',''));
return options;
}