• Post Reply Bookmark Topic Watch Topic
  • New Topic

Select a radio button in datatable

 
pintu pandey
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • 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
 
Tim Holloway
Bartender
Posts: 18408
58
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!