Hehe I see, but unfortunatelly its the only way I can see how to
implement this kind of functionality. The only way to avoid chaining
here would be to separate this one jsp page in two and have client
input form in two different steps. Problem is that this is not what
client wants :) so chaining it is

Oleg

On 11/15/05, Michael Jouravlev <[EMAIL PROTECTED]> wrote:
> If I remember correctly, when you either forward or redirect from one
> action to another, Struts performs the reset/populate/validate
> sequence again. If you redirect, the request is empty, so nothing to
> populate and the form corresponding to second action is not updated.
> But if you forward from one action to another, the request object
> still retains the input data, and is applied to the second form. If
> your second form has setters and they are compatible name-wize with
> input parameters, they will be set.
>
> On the other hand, what you want to do is a clear example of action
> chaining which is frowned upon ;-)
>
> Michael.
>
> On 11/14/05, Oleg <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > I found a long thread talking about one jsp, two action, two action
> > forms. However my situation is a bit different and suggested solutions
> > would not work, plus I didn't want resurrect an old thread :)
> >
> > I have:
> >
> > Jsp A -> Action A (ActionForm A)
> >
> > Now there are occasions when I need another action, Action B executed
> > before Action A but I can only use one jsp page. So what I would have
> > is:
> >
> > Jsp AB - Action B(ActionForm B) ->Action A(ActionForm A)
> >
> > Where Jsp AB has information to populate both ActionForms A and B.
> > Both ActionForms are session scope.
> >
> > Option 1. Would be to manually populate  ActionForm A in Action B, but
> > I would like to avoid that since there will be other possible Actions
> > similar to Action B(ActionForm B), so Action C, Action D all ending up
> > calling Action A(ActionForm A) and I don't want to change all of them
> > every time ActionForm A changes.
> >
> > Option 2. What if I ActionForm B extends ActionForm A and than it
> > becomes something like:
> > Jsp AB - Action B(ActionForm B) ->Action A { ...ActionForm A =
> > (ActionForm A)ActionForm B..}
> >
> > This could work but than I am out of luck when I need to use a
> > DynaValidatorForm as ActionForm C in  Action C(ActionForm C) - >
> > Action A(ActionForm A)
> >
> > What do you think guys? Whats the best way to go about it.
> >
> > Thanks,
> > Oleg
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to