• Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
Moli molina
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9597
36
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...
 
Moli molina
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Many Thanks for quick reply!

It works!

Jose
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!