So this means that I have to cache the original state of all my checkbox
referenced vars so I can set them back in the reset method? :(
    --m

----- Original Message -----
From: "Ted Husted" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, June 15, 2001 5:56 PM
Subject: Re: <html:checkbox>


> The underlying problem is that if a HTML widget has no value, then it
> does not get submitted at all. Which includes an unchecked checkbox.
>
> Struts needs to set the ActionForm properties from the submit, but if
> the checkbox isn't there it can't, and so the checkbox could end up null
> (rather than false).
>
> Struts calls reset before setting the properties from the submit, so by
> setting the checkbox to the default state (be it true or false), it will
> either remain that way or be changed to reflect the user gesture.
>
> Mike Thompson wrote:
> >
> > Still confused.  So in my reset method, I run through all my beans and
if
> > the property is false, I set it false again?  Does not compute?  I guess
I'm
> > not sure how to get the "corresponding" boolean property?
> >
> > What I have is a list of checkboxes that may be initialized to true or
false
> > depending on the beans state.  When a user "unchecks" one of these, how
do I
> > know which property to set to false in the reset method?

Reply via email to