In our project Wheels, we created a Delegate Action Controller Model. Using the same mechanism as in the Struts framework to recycle the instances of action classes, the current action controller can invoke another action controller defined on a different action mapping without the need to create a new instance every time.
For designers, they only need to specify the path of the delegate action mapping in the form controller model. The algorithm is very simple in the class com.netspread.guide.control.FormActionController which can be found in http://www.netspread.com/downloads/instructions.html If you like to use a different form bean for the delegate action controller, the visual form controller model allows the designers to create new instances of form beans (using the Construct tag) and assign properties from one form bean to another one (using the Assign tag). Jing Netspread Carrier http://www.netspread.com ----- Original Message ----- From: "Eric Jain" <[EMAIL PROTECTED]> To: "struts-user" <[EMAIL PROTECTED]> Sent: Monday, June 23, 2003 12:04 PM Subject: Transferring data between actions > What's the best way to forward from one Action to another Action that > has a different ActionForm? Naïve approch: > > public class SomeAction > extends Action > { > public ActionForward execute(...) > { > SomeForm someForm = (SomeForm) form; > OtherForm otherForm = new OtherForm(); > otherForm.setY(someForm.getX()); > // Perhaps call otherForm.validate() here > OtherAction otherAction = new OtherAction(); > return otherAction.execute(mapping, otherForm, ...); > } > } > > > -- > Eric Jain > > > --------------------------------------------------------------------- > 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]