This week's book giveaway is in the HTML Pages with CSS and JavaScript forum.
We're giving away four copies of Testing JavaScript Applications and have Lucas da Costa on-line!
See this thread for details.
Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Using selectManyCheckbox

 
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.
 
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.
 
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.
 
    Bookmark Topic Watch Topic
  • New Topic