You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by "Wetterau, Jan" <ja...@LP-GMBH.com> on 2006/08/10 11:54:19 UTC
A problem with radio buttons in datatables
Hello,
I have a problem with a set of radio buttons using it in a datatable:
<t:dataTable value="#{BackingBean.dataList}" var="dataItem" >
<t:column>
<f:facet name="header">
</f:facet>
<h:selectOneRadio id="radioList">
<f:selectItem value="#{dataItem.id}" />
</h:selectOneRadio>
</t:column>
<t:column>
<f:facet name="header">
<h:outputText value="Description" />
</f:facet>
<h:outputText value="#{dataItem.description}" />
</t:column>
</t:dataTable>
I have a datatable (MyFaces Tomahawk) where I need one radio button for each
row. My Problem is that I can't make a set out of the radio buttons, so that
the user can select only one item, because there is no attribute 'name' for
the radio buttons, like in HTML. The code example above allows the user to
select more than just one radio button. So my question is: How can I build a
set of radio buttons where every radio button represents one row of the
datatable?
Thank you,
Jan