On 9/1/06, Wang, Sherwin X. <[EMAIL PROTECTED]> 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?
http://struts.apache.org/1.x/struts-taglib/faq.html#checkbox 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. http://struts.apache.org/1.x/struts-core/dtddoc/org/apache/struts/resources/struts-config_1_3.dtd.html#form-property 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: https://issues.apache.org/struts/browse/STR-2265 HTH, -- Wendy --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]