You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by bmcgovern2004 <bm...@yahoo.com> on 2004/06/18 14:04:05 UTC

Struts 1.0.2 Dynamic Forward

I'm an newbie.  I've made an honest attempt at finding an answer in 
the archives without success. Can some please help?

I've successfully written a simple struts application. 

I have a jsp that presents a listbox for user selection.  I have 
multiple action "flows" that may need to utilize the standard screen 
somewhere in the flow.
In the config below, I may need to forward to "/standard1" while 
doing the screen flow for action1 or action2

<action    path="/action1"
           type="com.xxxxx.Action1"
           scope="session"
           name="action1Form">
  <forward name="aaaaaaaa"  path="/WEB-INF/jsp/aaaaaaaa.jsp" />
  <forward name="bbbbbbbb"  path="/WEB-INF/jsp/bbbbbbbb.jsp" />
  <forward name="cccccccc"  path="/WEB-INF/jsp/cccccccc.jsp" />
</action>

<action    path="/action2"
           type="com.xxxxx.Action2"
           scope="session"
           name="action2Form">
  <forward name="dddddddd"  path="/WEB-INF/jsp/dddddddd.jsp" />
  <forward name="eeeeeeee"  path="/WEB-INF/jsp/eeeeeeee.jsp" />
  <forward name="ffffffff"  path="/WEB-INF/jsp/ffffffff.jsp" />
</action>

<action    path="/standard1"
           type="com.xxxxx.Standard1"
           scope="session"
           name="standard1Form">
  <forward name="standard1"  path="/WEB-INF/jsp/standard1.jsp" />
</action>


In an action class, is it possible to switch gears, populate a new 
form type with some acquired values, and forward to a different 
action mapping that uses the new form?  Then continue with the 
original flow?   Or is there an elegant way to handle this?

Note: The solution must utilize Struts 1.0.2.

Thank you for your time.



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Struts 1.0.2 Dynamic Forward

Posted by bmcgovern2004 <bm...@yahoo.com>.
Rick,
   Sorry if I the problem def I supplied wasn't complete enough.  I 
was trying to avoid keyboard diarrhea. I'm sure that I'm making this 
more difficult than it need be. :-)
   I have a number of mappings.  Each with its own unique action, 
form, and set of forwards comprising the jsp screens of a use case.  
All actions extend a base action.  All forms extend a base form.  
   Based on the data situation in any action, I may need to present a 
common data entry page.  This need could occur in any of the use 
cases.
   I've defined the common data entry page as its own mapping with 
its own unique form and path.
   Struts supplies me with a mapping and a form.   I'm confused as to 
how I can switch to the common data entry page mapping while 
prepoulating its form with data taken from the form of the invoked 
action.--- In struts@yahoogroups.com, Rick Reumann <st...@r...> 
wrote:
> Can you be a little more specific about what you want to accomplish 
from 
> a "user's perspective." You might be making this more complicated 
than 
> it needs to be. In other words what exactly do you want to have 
> happen... A user selects something from a drop down list... and 
then 
> what? I just think we can work out something that might be a lot 
easier 
> and cleaner.
> 
> -- 
> Rick
> 
> --------------------------------------------------------------------
-
> To unsubscribe, e-mail: user-unsubscribe@s...
> For additional commands, e-mail: user-help@s...


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Struts 1.0.2 Dynamic Forward

Posted by Rick Reumann <st...@reumann.net>.
bmcgovern2004 wrote:

> I've successfully written a simple struts application. 
> 
> I have a jsp that presents a listbox for user selection.  I have 
> multiple action "flows" that may need to utilize the standard screen 
> somewhere in the flow.

Can you be a little more specific about what you want to accomplish from 
a "user's perspective." You might be making this more complicated than 
it needs to be. In other words what exactly do you want to have 
happen... A user selects something from a drop down list... and then 
what? I just think we can work out something that might be a lot easier 
and cleaner.

-- 
Rick

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org