Ah! I was missing out the:
scope="request"
attribute for the action mapping in struts-config.
Sean
Ted Husted
<husted@apach To: [EMAIL PROTECTED]
e.org> cc:
Subject: Re: Resetting a bean
05/06/2001
19:56
Please
respond to
struts-dev
The ActionServlet usually does this for you when it is needed.
In general, your ActionForm beans should be in request context, and so
you would start out a fresh one with a new request cycle. If validation
fails, the ActionForm beans carries the data back to the input form so
the user can correct it. Struts does try to recycle ActionForm beans
when it can, and will calls reset() on a pre-existing bean before
populating it again from the request. You generally should not need to
call this yourself.
It is important to remember that ActionForm beans are transitory and
should only be used to ferry data between the HTML form and the Action,
where the data can be transferred to a persistent object.
[EMAIL PROTECTED] wrote:
>
> All,
>
> What's the best way to call the reset() method on a Form Bean? (so that
all
> the values on a form are always the default ones)
>
> Is there a tag to do so?
>
> Regards,
>
> Sean