struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wendy Smoak" <>
Subject Re: De-select sticky options doesn't work
Date Fri, 01 Sep 2006 20:03:31 GMT
On 9/1/06, Wang, Sherwin X. <> wrote:

> Since the framework fails in this case, I have to reset the properties
> in the application as a work around. Shouldn't Struts be enhanced to
> support this capability if there wasn't one?

As you mention, the real issue is that browsers only submit successful
form elements, and an unchecked checkbox is not a successful form
element.  Using the reset method of a session scoped form to clear
checkboxes has long been the recommended approach.  I'd argue that you
are working around the limits of the HTML specification, not Struts.

If you are using dynamic form beans configured in struts-config.xml,
Struts 1.3 introduces a 'reset' attribute for <form-property>.  I just
recently discovered it and haven't tried it yet.

reset  - The flag that indicates when this property should be reset to
its "initial" value when the form's "reset()" method is called.  If
this is set to "true", the property is always reset when "reset()" is
called. This can also be set to one or more HTTP methods, such as GET
or POST. In such a case, the property will be reset only when the HTTP
method used for the request being processed is included in this
attribute's value(s). Multiple HTTP methods can be specified by
separating them with whitespace or commas.

Here's a related JIRA issue:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message