struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "C. Struts" <str...@cmbsystems.com>
Subject Re: multibox, checkbox PROBLEM FOUND, SOLUTION NOT!!!
Date Sat, 19 Oct 2002 16:11:44 GMT
Wendy's correct, according to
http://jakarta.apache.org/struts/doc-1.0.2/struts-html.html#checkbox --

"WARNING: In order to correctly recognize unchecked checkboxes, the
ActionForm bean associated with this form must include a statement setting
the corresponding boolean property to false in the reset() method."

-c


----- Original Message -----
From: "Wendy Smoak" <Wendy.Smoak@asu.edu>
To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
Sent: Saturday, October 19, 2002 12:03 PM
Subject: RE: multibox, checkbox PROBLEM FOUND, SOLUTION NOT!!!


>
> I'm coming into this discussion late, so ignore me if I'm out in left
field,
> but it sounds like you're unhappy that when *no* checkboxes are checked,
> *no* methods get called.
>
> When you submit the form, only "successful" form elements are sent in the
> request, so if *no* checkboxes are checked, *nothing* related to those
> checkboxes will be present in the request.
>
> Isn't this what the "reset" method is all about?  The reset method will be
> called before Struts automagically populates all of your ActionForm
fields.
> I can't tell what your Collection is from this post, but try clearing out
> *all* of the values in the Collection that handles your checkboxes in the
> reset() method of the Form.
>
> Then, if you uncheck all of the boxes and submit, you should see that none
> of them are checked when the form is redisplayed (or you use the data).
>
> Hope that helps,
>
> --
> Wendy Smoak
> Arizona State University PA IRM
>


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message