struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Miller" <>
Subject Checkbox fix
Date Mon, 21 Aug 2000 23:59:23 GMT
OK, here's my first crack at a solution for the checkboxes problem.

<struts:checkbox property="myProp" managed="true">

The managed="true" tells struts to manage the checkboxes so that unchecked
checkboxes will still update the ActionForm properties correctly.

Source Changes:
struts.tld - Added the 'managed' attribute. - Added some code to generate the hidden field when
managed="true". - Added a constant that dictates what the hidden field name's
prefix should be. - Added some code to use the hidden fields to determine if an
ActionForm needs to have a checkbox property set to false.

I have only tested this with a fairly basic setup. I haven't tested it with
prefixes/suffixes on the field names (because I can't see in the docs how
this is supposed to work!), or for multiple fields with the same name. The
prefixes/suffixes *should* work OK as far as I can see, but I don't think
the multiple fields with the same name will work. Of course in the mean time
you can avoid using the managed attribute in this case until a fix is in

If anyone could confirm my suspicions on the above two points (or explain to
me how they work) that would be most helpful. I'll look at fixing any bugs


View raw message