This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using selectManyCheckbox

 
Viswanath Sriram
Greenhorn
Posts: 12
  • 0
  • 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
  • 0
  • 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
  • 0
  • 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.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic