struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthias Wessendorf" <mwessend...@pironet-ndh.com>
Subject [Struts 1.3] Using Commons Chains instead of Action(s)
Date Thu, 13 Oct 2005 07:28:56 GMT
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: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Mime
View raw message