aspose file tools*
The moose likes JSF and the fly likes RADIO BUTTON WITH ROW IN DATA TABLE Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "RADIO BUTTON WITH ROW IN DATA TABLE" Watch "RADIO BUTTON WITH ROW IN DATA TABLE" New topic
Author

RADIO BUTTON WITH ROW IN DATA TABLE

Ananth Majumdar
Greenhorn

Joined: Aug 17, 2006
Posts: 20
How to implement a datatable with a radio button for each row so as to select the row?

Is there other way like for a selectItems only can we have multiple columns can we have a datatable in selectItems?
Richard Green
Ranch Hand

Joined: Aug 25, 2005
Posts: 536
see http://www.coderanch.com/t/212176/JSF/java/selectManyCheckbox


MCSD, SCJP, SCWCD, SCBCD, SCJD (in progress - URLybird 1.2.1)
Richard Green
Ranch Hand

Joined: Aug 25, 2005
Posts: 536
see http://www.jroller.com/page/cenkcivici?entry=jsf_datatable_single_row_selection
Ananth Majumdar
Greenhorn

Joined: Aug 17, 2006
Posts: 20
Thanks dawson
Viswanath Sriram
Greenhorn

Joined: Jul 20, 2006
Posts: 12
you can have a radio button for wach row like this


<h:dataTable value="#{beanname.methodname}" var="xxx">

<h:column>
<h:selectOneRadio>
<f:selectItem itemValue="#{xxx.propertname}" itemLabel="{#xxx.propertname}"/>
</h:selectOneRadio>
</h:column>

<h:column>
// other controls
</h:column>
<h:column>
// other controls
</h:column>
<h:column>
// other controls
</h:column>

</h:dataTable>
Ananth Majumdar
Greenhorn

Joined: Aug 17, 2006
Posts: 20
I am required to edit the entry selected with the radio button. As the radio button is associated with only the first column I can only display that value in the next page but for editing I should get all the items in the row.. I have heard that there is a component called SelectOneRow which has this functionality .
 
Don't get me started about those stupid light bulbs.
 
subject: RADIO BUTTON WITH ROW IN DATA TABLE