I have a list name companyList iterating to show list of user in table.Every row has company name and a radio button to select company id . Here Problem is how I can bind a radio button for a row with respective company id show that user can choose only one company id from table as I do have list value to bind with radio.
=Company Name=|=Company ID====
ABC | radio with company ID 1
XYZ | radio with company ID 2
<display:table uid="companyConfig" name="dataExchangeCompanyList" htmlId="companyListTable" requestURI="ncrDatapackageExport!ajax" ajax="true">
<!-- Company Name -->
<display:column titleKey="tdp.export.company.name" class="company-column textLeft" sortable="true" sortProperty="company">
<s:property value="#attr.companyConfig.company"/>
</display:column>
<!-- Check Box -->
<display:column titleKey="tdp.export.select" class="textCentre" media="html">
<s:radio name="selectedCompanies" value="%{#attr.companyConfig.id}" />
</display:column>
</display:table>
Here I am using display table to iterate over list