I need to show a series of check boxes and if a condition is succeeded, I need to check them. Below is my code. I have regions which is a hashmap and SelectedRegions which is
There are really many ways to do this. You should also check out the and tags;
Also note that to follow DRY, you could put the around the checked="checked" part only, since all the rest is the same.
Keeping it simple, with your code as-is, one way consists in using OGNL's in (contains) and OGNL's {} (list projection) like follows:
-
checked = "checked"
name = "theaterCheckBox"
class = "theaterCheckBox" />