• 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
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

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 .
 
Politics n. Poly "many" + ticks "blood sucking insects". Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic