Problem in getting selectOneRadio value placed in dataTable
I want to get Id bind with selected radio button, whn radio button is selected, the value of backing bean should be set.
But the problem me facing is, If I check last radio button I get the value and if I get rest of radio buttons my bean value didnt set. Why it happen that only last radio button of data table row works fine.
I hope I u ppl help me
<h:dataTable value="#{depositMoneyPageBean.allCreditCardsOfUser}" var="creditCardData"
>
<h:column>
<f:facet name="header">
<f:verbatim>...</f:verbatim>
</f:facet>
<h:selectOneRadio id="selectRadio" value="# {depositMoneyPageBean.selectedCreditCardId}" onclick="selectOne(this.form , this)" >
<f:selectItem itemValue="#{creditCardData.cardId}" /> </h:selectOneRadio>
</h:column>
<h:column>
<f:facet name="header">
<f:verbatim>Payment Method</f:verbatim>
</f:facet>
<h:outputText value="#{creditCardData.cardTypeName}" styleClass="tLabel" />
</h:column>
</h:dataTable>

