mercredi 21 janvier 2015

Checking a checkbox on a JSP page based on List values

I found similar problem: Checking a checkbox based on a database entry on a JSP page


I have a Faculty entity and a Subject entity. Every faculty has a list of preliminary subjects. So also I have a faculty edit page where I have a checkbox with all subjects.


Let's say I have two collections. One with all the subjects and another with subjects that needed for this faculty.


And when user wants to edit faculty at the start he gets edit page with checked values on subjects where value from faculty subjects equals to value from collection of all subjects.


How this can be achieved ? Or maybe there is a simpler way ?





Aucun commentaire:

Enregistrer un commentaire