Rich,
The example is based on stuff I am currently using with Tomahawk 1.1.3.
What is the error you are getting and what is your version of Tomahawk?
Paul Spencer
Rich Argo wrote:
Hey Paul,
Would you mind updating the wiki page (Dynamic Example) at
http://wiki.apache.org/myfaces/Display_Radio_Buttons_In_Columns ? I would,
but I don't have access to it. When going by the current wiki page, the
radio buttons will display, but nothing gets set when the form is posted.
To fix this, the t:selectOneRadio tag should not be inside the t:dataTable
tag, but just underneath the h:form tag. Also, the "for" attribute of the
t:radio tags should use an absolute id. Below is a modified example.
There's also an added value attribute in the t:selectOneRadio tag, so
"public String selectedButton" (plus setters/getters) will also need to be
added to RadioButtons.java.
<h:form id="theForm">
<t:selectOneRadio id="buttons"
value="buttonList.selectedButton"
layout="spread"
forceId="true"
forceIdIndex="false">
<f:selectItems value="#{buttonList.selectList}" />
</t:selectOneRadio>
<t:dataTable newspaperColumns="3"
var="row"
value="#{buttonList.dataModel}"
rowIndexVar="index">
<h:column>
<t:radio for=":theForm:buttons" index="#{index}" />
</h:column>
</t:dataTable>
</h:form>