You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Eric Pugh <ep...@upstate.com> on 2002/05/10 21:05:08 UTC

RE: Calling another Action from an Action

I wanted to see if actionloaded is still the reocmmended way...?  Versus
just creating the action..  And are their any issues with calling an action
other methods if it is an ActionEvent instead?

Eric
-----Original Message-----
From: David Vandegrift [mailto:dvandegrift@bluearc.com]
Sent: Monday, April 29, 2002 3:37 PM
To: Turbine Users List
Subject: Calling another Action from an Action


Re:
http://www.mail-archive.com/turbine-user%40jakarta.apache.org/msg05626.html

The above message recommends using the ActionLoader to call Action from
another Action.

Is this the only safe way?
   Action p2a =
(Page2Action)ActionLoader.getInstance().getInstance("com.pkg.Page2Action");
   p2a.doPerform(data, context);

Or could I just create an instance of another Action and call the desired
method?
   Page2Action p2a = new com.pkg.Page2Action();
   p2a.doPerform(data, context);


I basically want to "forward" from one template to another but I want to
make sure that the 2nd template's Action is called first.
What's the best way to accomplish this?      (I don't think setTemplate() is
enough)

Thanks,
  David


*********************************************************************
This e-mail and any attachment is confidential. It may only be read, copied
and used by the intended recipient(s). If you are not the intended
recipient(s), you may not copy, use, distribute, forward, store or disclose
this e-mail or any attachment. If you are not the intended recipient(s) or
have otherwise received this e-mail in error, you should destroy it and any
attachment and notify the sender by reply e-mail or send a message to
sysadmin@bluearc.com
*********************************************************************


--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>