my dog learned polymorphism*
The moose likes Struts and the fly likes Problem with html:checkbox tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Problem with html:checkbox tag" Watch "Problem with html:checkbox tag" New topic
Author

Problem with html:checkbox tag

Manu Ramakrishnan
Greenhorn

Joined: Jun 07, 2003
Posts: 10
Can anybody help me in this ?
If struts checkbox tag is not checked what will be the value returned ? The mutator methods of the Form Bean is not getting invoked. Can I specify an unchecked value for this tag ?
Regards
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
The problem is that the checkbox field is not submitted when it is not checked. As a workaround you can set the value of your checkbox to false
in the reset method of the form.
On the Struts FAQ page this workaround is explained in detail. You can find details here
Olli
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Problem with html:checkbox tag