My problem is that I don't know the path for the second action, but I
do know the "forward to second page".
I'm trying to implement a custom workflow engine where states are
mapped to the <forward> definitions. This way I don't hardcode the
form action in JSP but rather derive it from the state name.


On 8/15/05, Frank W. Zammetti <[EMAIL PROTECTED]> wrote:
> I think you'd have to know the path for the second action (/SecondPage
> in this case)...
> 
> mapping.getModuleConfig().findAcrionConfig("/secondPage").findForwardConfig("forward
> to second page");
> 
> Caveat: I haven't tried this. :)
> 
> There is also a findForwardConfigs() method of ModuleConfig, so I
> suppose if you didn't know the path you could call that, which returns
> an array of ForwardConfig[] objects, then iterate over them calling
> findForwardConfig() for the forward you want until you find it.
> 
> However, I have to ask... why are you trying to do this in the first place?
> 
> Frank
> 
> Martin Bunen wrote:
> > Hi.
> > Assume I have the following in my struts-config.xml:
> > ...
> > <action-mappings>
> >   <action path="/FirstPage" name="FirstForm" type="com.mypkg.FirstAction" 
> > ...>
> >     <forward name="forward to first page" .../>
> >   </action>
> >
> >   <action path="/SecondPage name="SecondForm" type="com.mypkg.SecondAction" 
> > ...>
> >     <forward name="forward to second page" .../>
> >   </action>
> > </action-mappings>
> >
> > Assuming I'm currently inside of com.mypkg.FirstAction.execute() method.
> > How can I obtain ActionConfig from the "forward to second page"
> > forward definition?
> > What I mean is that I know the forward name for the SecondPage action
> > mapping. I need to get to the path "/SecondPage".
> >
> > Thanks.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> >
> > .
> >
> 
> --
> Frank W. Zammetti
> Founder and Chief Software Architect
> Omnytex Technologies
> http://www.omnytex.com
> 
> 
> ---------------------------------------------------------------------
> 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