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

Select a radio button in datatable

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear All,

I am using radio button while iterating data in a datatable.
On click of radio button data is being populated on fields by a4j:support.

The problem is that when i click radio button data is being populating but radio button get deselct.
Can any one tell me how i can persist the selected radio button
 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I cannot understand you. However you don't "iterate" a dataTable. A dataTable is a 2-dimensional display-only control, not a logic component.

I can tell you something about radiobutton controls, however. In JSF a radiobutton is a set of controls, exactly one of which may be selected at any given time. Selecting some other buttons de-selects any previously-selected button.

Because of the fact that the button group is a single element, it can be used to provide a set of mutually-exclusive setting within a dataTable row, but not between dataTable rows. So using radio buttons to select an entire row in a dataTable is not possible. There are, however other mechanisms available to select a dataTable row that don't involve radio buttons. Including ones that use "fake" radio buttons.

Check the recent postings in this forum and you will find that someone else asked a similar question about radiobuttons. You may find the discussion informative.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic