On 1/3/06, Niall Pemberton <[EMAIL PROTECTED]> wrote:
> Reset gets called just before the form is populated and the most common use
> is for resetting boolean properties set using checkboxes. This is because if
> the checkbox is not "checked" browsers do no submit a value, so the
> "population" mechanism doesn't set the property to "false" if the checkbox
> is "un-checked".

Which, in session-scoped ActionForms, is an issue. Once the box is
checked, there's no way for the user to to uncheck it.

But, if you are using booleans for the checkbox fields, it otherwise
doesn't matter, since a request-scope ActionForm will instantiate to
false (clear).

Along the way, people got into the habit of clearing everything in
reset, but, except for the session-scoped checkbox case, using reset
to clear fields is busy work.

-Ted.

>
> Niall
>
> ----- Original Message -----
> From: "fea jabi" <[EMAIL PROTECTED]>
> Sent: Tuesday, January 03, 2006 6:22 PM
>
>
> > When exactly this method has to be used and when does this get called?
> >
> > Why do the checkboxes have to be reset?
> >
> > Prepopulating the formbean is done in Action class. hence, it's not clear
> to
> > me the exact use of using the reset method.
> >
> > Thanks.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to