• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

RADIO BUTTON WITH ROW IN DATA TABLE

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Ranch Hand
Posts: 536
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
see https://coderanch.com/t/212176/JSF/java/selectManyCheckbox
 
Richard Green
Ranch Hand
Posts: 536
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
see http://www.jroller.com/page/cenkcivici?entry=jsf_datatable_single_row_selection
 
Ananth Majumdar
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks dawson
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 .
 
Yes, my master! Here is the tiny ad you asked for:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic