Reputation: 21
Suppose I have 3 check boxes: struts2, sql, jquery.
My bean name: Bean
In JS:
for(x in data.Beans ){$('#'+data.Beans [x].check).attr('checked',true);}
In JSP:
checkbox id="struts2" name="Beans.struts2" /><br>
checkbox id="jsp" name="Beans.sql" /><br>
checkbox id="jquery" name="Beans.jquery" /><br>
Suppose struts2
and jQuery
value is checked so I want to show these two check boxes only in the JSP page.
How is this is possible?
Upvotes: 0
Views: 227
Reputation: 2004
You could use JSTL to do an if checked then display checked, otherwise display unchecked.
Upvotes: 1