If the form is in session scope and its not a "wizard" style form then it
gives you an opportunity to initialise whatever properties you want to.

Say you had a feedback form where you have a name field, comments field and
priority field - each time you want to show a "new" default form.


You probably want to leave the name field so the user doesn't have to key it
in again - clear the comments field and set the priority to a default e.g.
"low" - you would code in the reset() method to clear the comments and set
the priority.

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: 15 June 2001 01:00
> To: [EMAIL PROTECTED]
> Subject: reset function
>
>
>
> **************************************************************************
>
> Note: This e-mail is subject to the disclaimer contained at the bottom
> of this message.
>
> **************************************************************************
> :
>
> I confuse about the 'reset' function in the actionForm. The document said
> this method reset all bean properties to their default state. Up to
> knowledge, the actionForm can be stored in request scope and
> session scope.
>
> In the request scope, the actionForm just created by actionServlet or
> <HTML:form> so there is no need to do reset at all. I think we can initial
> the properties in the constructor.
>
> In the session scope, developer can maps multiple JSP pages to one
> actionForm to provide wizard like application. The reset function will
> reset bean's properties previous populate.
>
> So, what is the aim of the reset function?
> Am I miss something?
>
> Regards
> Kelvin
>
> Regards
> Kelvin
>
>
> :
> ******************************************************************
> **************
>
> The information transmitted in this message and attachments (if any)
> is intended only for the person or entity to which it is addressed.
> The message may contain confidential and/or privileged material.
> Any review, retransmission, dissemination or other use of, or taking
> of any action in reliance upon this information, by persons or entities
> other than the intended recipient is prohibited.
>
> If you have received this in error, please contact the sender and
> delete this
> e-mail and associated material from any computer.
>
> The intended recipient of this e-mail may only use, reproduce, disclose or
> distribute the information contained in this e-mail and any
> attached files,
> with the permission of CGU Insurance.
>
> This message has been scanned for viruses and cleared by MailMarshal.
>
> ********************************************************************
> :
>

Reply via email to