Wolfgang-
I am now doing something like this
inside of execute(Context context):
ActionContext ctx = (ActionContext) context;
...
ActionMapping mapping = (ActionMapping)ctx.getActionConfig();
ActionForward fw = mapping.findForward("success");
Since the passed ContextIMPL is ServletActionContext, I think it will be
ok... in any environment (portlet e.g)
Any comments?
-Matthias
On Thu, 2005-10-13 at 11:42 +0200, Wolfgang Gehner wrote:
> do:
>
> ActiionMapping mapping = (ActionMapping)
> context.get(org.apache.struts.chain.Constants.ACTION_CONFIG_KEY);
> ActionForward fw = mapping.findForward(forwardName);
>
> context.setForwardConfig(fw);
>
> Also see my Struts 1.3 dev suite (250MB download) at www.infonoia.com
> (you need to register).
> We wrapped the above in our own ActContext class which extends
> ServletActionContext and has context.setForward(forwardName)
> We also wrote a DispatchCmd, similar to DispatchAction, but for
> commands, (so you have event handles like onSave(Act Context))
>
> Also see our Struts 1.3 dev suite including svn to Struts 1.3 (250MB
> download) to get a head start on 1.3 (need to register to access).
> at www.infonoia.com community downloads section.
>
> Best regards,
>
> Wolfgang Gehner
>
>
> Matthias Wessendorf wrote:
>
> >Hi all,
> >
> >I have updated some apps to 1.3, that went pretty smooth :-)
> >(Thanks to the good documentation in wiki!!!)
> >
> >I saw in struts-config DTD that for <action> element now the
> >attributes "catalog" and "command" were introduced.
> >
> >I got a chain of commands to work (partly) w/ 1.3.
> >I now have two questions on working with chains instead of actions.
> >
> >#1
> >How do I *caculate* the navigation inside of my command?
> >Or do I need something extra? After my chain of commands was
> >executed, I saw a blank page (yes... no ActionForward found ;-))
> >
> >I have in struts-config something like that:
> ><action ...command="myChain" catalog="publishCat"...>
> > <forward name="success" ...>
> ></action>
> >
> >Is there a "key" for the Context object, to tell him "success" must be
> >used for finding the ActionForward object ?
> >
> >#2
> >This is more a doubt on accessing formbeans in a command.
> >In my command I did the following to lookup my formBean object
> >(inside execute(Context cxt)):
> >FormularBean fb = (FormularBean) cxt.get(Constants.ACTION_FORM_KEY);
> >//org.apache.struts.chain.Constants
> >
> >this works pretty well, but now my doubt... is this the "right" way ?
> >
> >
> >Thanks for any hint :-)
> >
> >
> >Best Regards
> >Matthias Weßendorf
> >
> >---------------------------------------------------------------------
> >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]