You shouldn't be calling an Action from an Action.
Action chaining is not recommended and is considered
poor practice. Action classes are an implementation of
Command pattern and as such should delegate to reusable
business components.
I would refactor your business logic embedded in Action classes
into business components or application services. You can
then call these from any Action class and they will be easier
to unit test.
If you want Struts to provide the ActionForm for each action then
you must bind the ActionForm to the Action class in the action mapping.
So if Actions, A, B, and C all need ActionFormC then you will have
to define this in the struts-config.xml file. One way of maintaining
state across actions is to place the ActionForm in session scope.
robert
-Original Message-
From: Raffe Paffe [mailto:[EMAIL PROTECTED]
Sent: Friday, November 19, 2004 7:18 AM
To: [EMAIL PROTECTED]
Subject: action to action with form
Hi
I have a system with some action classes that i need to call from my action
class.
I do not have the source code of the action classes that needs to be called
and I
can not change them but I know how the actionform is suppose to look and I
want
to this serverside.
So, I have actioclass A and I want to call action class B witch needs
actionform C.
I will use the mappings to chain the response from B to my first action
class A.
Can I do this and if yes, how? Can I create actionform C and chain it
somehow?
Code examples woulde be great.
Thanks
Ralf
Good judgement comes from experience, and experience comes from bad
judgement.
_
FREE pop-up blocking with the new MSN Toolbar - get it now!
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/
-
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]