aspose file tools*
The moose likes Struts and the fly likes List of dinamic checkboxes, how to get values, reflection of properties Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "List of dinamic checkboxes, how to get values, reflection of properties" Watch "List of dinamic checkboxes, how to get values, reflection of properties" New topic
Author

List of dinamic checkboxes, how to get values, reflection of properties

Moli molina
Greenhorn

Joined: Apr 07, 2010
Posts: 19
Hi at all,

I have a question, about getting the values of a dinamic list of checkboxes.
I have a list of objects, and these objects have a list of checkboxes.
I print the checkbox on a jsp :


The name of the list of checkboxes is dinamic. How I do to get the values at the action ?

It's good practice?
Thanks!
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9302
    
  17

From what I could understand from your code, instead of check_%{organ} use check['%{organ}'], that way you can catch all the selected checkbox into a HashMap in the action...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Moli molina
Greenhorn

Joined: Apr 07, 2010
Posts: 19
Many Thanks for quick reply!

It works!

Jose
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: List of dinamic checkboxes, how to get values, reflection of properties