Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using selectManyCheckbox

 
Viswanath Sriram
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have used datatable tag to display the rows.For every row a check box will appear with its id.Now i want the list of the selected items in the controller.can any body explain this with code.
 
Sushma Sharma
Ranch Hand
Posts: 139
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you can use your backing beans's property which should be array. but I am not sure how to do that.

the other way round is to iterate through the request parameters and get the value.

e.g.



where
pr:prForm:prTable - pr is subview id, prForm is Form id and prTable is dataTable id.

chk - is id of check box

cnt - is a counter to keep track of the check box number.

I hope that helps.
 
Richard Green
Ranch Hand
Posts: 536
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
use a dataTable to display your checkbox and other controls.

ie.,


thats all you need. you can be assured that when the action method in your backing bean is called, the "someList" will be populated correctly with what the user has selected.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic