One way of resolving this is to have a hidden field in your forms which
specifies which step is being performed. Then in your reset() method, you
can check which step you are at, and reset (or not) fields as appropriate.

--
Martin Cooper


----- Original Message -----
From: "Wilhelm Fitzpatrick" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, August 17, 2001 5:18 PM
Subject: How to keep ActionForm in session from being reset?


> I'm trying to use form beans as suggested in the struts documentation,
> where I use a single form across several actions and pages, accumulating
> data as a I go.  Specificially:
>
> I have an Action with constructs the form, prepoulates it with some data,
> then stores it in the session.  This action then forwards to .jsp page
> that displays the form, and collects more data.  When this form is
> submitted, the whole goes to a third Action that does some processing.
>
> At first, I couldn't get this to work until I figured out that the
> framework is calling reset() on the form bean on each action.  So I worked
> around the problem by *not* resent some form fields in the reset call, but
> this seemed like cheating.
>
> Is there are a way in the action mapping to tell the framework *not* to
> reset Form before using it?
>
> -raf
>
>
>


Reply via email to