SelectOneRadio inside datatable?
How do I put a <h:selectOneRadio> inside a datatable> Ie if I wanted to rank names from 1 to 3?
<h:dataTable value="#{bean.myNames}"
var="n"
>
<h:column>
<f:facet name="header">
<h:outputText value="Function Name"/>
</f:facet>
<h:outputText value="#{n.Name}"/>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="Rank"/>
</f:facet>
<h:selectOneRadio binding="#{bean.selectOneRank}" >
<f:selectItem itemValue="1" />
<f:selectItem itemValue="2" />
<f:selectItem itemValue="3" />
</h:selectOneRadio>
</h:column>
</h:dataTable>
How do I in the bean say that name y got rank z?
[859 byte] By [
ericchilea] at [2007-11-27 6:21:44]

# 8
Im sorry, I couldn't edit my post after I read it again...
What is happening is I am adding a value to the EJB in the form of a String. So that the value of the SelectOneRadio can be set to this.
But when I do that the EJB things that it is a Column in the Table in the Database, and none of the queries work.
How do you add a variable to an EJB and not have it be part of the queries?
# 10
Worked thanks...
I wish you could iterate though two items at one time in a data table... like this
List temp;
List temp2;
for (int i=0; i<temp.size(); i++){
temp.get(i);
if (temp2.get(i)) temp2.get(i);
}
But in a datatable....
I also found this
http://www.javaworld.com/javaworld/jw-02-2007/jw-02-jsf.html?page=2
That would work better IMHO
Thanks for your help.>