struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg <oleg...@gmail.com>
Subject Posting from 1JSP to 2Actions and 2Forms
Date Tue, 15 Nov 2005 03:09:24 GMT
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: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message