Manodip
Manodip

Reputation: 21

In Jsp page i don't want to show those check box which are not checked whose value are coming from bean

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

Answers (1)

Davos555
Davos555

Reputation: 2004

You could use JSTL to do an if checked then display checked, otherwise display unchecked.

JSTL Tutorial

Upvotes: 1

Related Questions