Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • 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: 9528
32
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic