"SHROM,BENJAMIN (HP-USA,ex1)" wrote:

> Hello,
>
> When does reset(..) in ActionForm being called ?
>
> >From API:
>         "This method is called before the properties are repopulated by the
> controller servlet."
>
> What are the cases when it happens?
>

As Ron points out, it is called immediately before the property setters that
correspond to the request parameters in your form are called.

A primary reason this method exists is to deal with checkboxes.  Due to
restrictions of the way HTML forms work, you will receive notification if a
checkbox is checked, but *not* if it is unchecked.  To make sure that your
checkboxes are recorded accurately, you should set the corresponding boolean
property to null in the reset() method.

>
> Regards,
> Benjamin.

Craig McClanahan


Reply via email to