You can also be more careful about which properties are reset when. Both
the mapping and the request are passed to reset, giving you the
opportunity to look ahead.

The default reset does nothing. The properties are only affected if
you've overridden this class and specified what happens to the
properties before the form is populated from the request.

If you forward to another Action, any properties you changed in a
previous Action will revert to the original, since these are populated
from the request again. But if you are only setting additional
properties, then this won't be a problem.

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel +1 716 737-3463
-- http://www.husted.com/struts/

[EMAIL PROTECTED] wrote:
> 
> Yes, I would expect this. Any properties you set in the form bean from the
> first action will be cleared when the form bean is reset prior to
> populating it for the second action.
> 
> If you need to add additional parameters to the request, you'll need to do
> it by adding them to the URL used to invoke the second action.
> Alternatively, you could avoid the use of parameters, and pass them as
> request attributes instead.
> 
> --
> Martin Cooper
> 
> At 08:56 AM 10/19/01, Tom Klaasen (TeleRelay) wrote:
> >Hi all,
> >
> >I noticed the following:
> >
> >I have a jsp with a corresponding form. When I press "submit", it gets
> >forwarded to an Action which sets some additional properties on the
> >form. Then I forward to another Action. When I read the additional
> >properties of the form, they have disappeared. Is this normal behaviour?
> >And if so, why?
> >
> >thanks,
> >tomK

Reply via email to