The problem I'm having is reuse. Say I want to use WizardSupport again in a similar app, but add another step. How can I subclass WizardSupport without having to subclass all my actions as well?
Nick
Hookom, Jacob wrote:
Leave action forwards alone and instead, create a supporting method that can be called from your actions that looks at your session and returns the appropriate actionforward. So there's your complex logic, I wouldn't re-write the struts forwarding framework.
String stepName = WizardSupport.getNextForward(HttpSession, SomeCriteria); return mapping.findForward(stepName);
-----Original Message-----
From: Nick Wesselman [mailto:[EMAIL PROTECTED] Sent: Monday, March 22, 2004 12:04 PM
To: Struts Users Mailing List
Subject: complex forwarding logic?
I'm writing an application that will require some fairly complex forwarding logic. After an action completes, it will need to query my model for the current application "state" and translate that into the appropriate forward/next step. The forward itself may require some pre-processing. To further complicate matters, I'd like to be able to subclass and add or remove "steps" from the process.
At this point, I'm planning on creating a sort-of "forward helper" class which can translate a business state into an ActionForward and prepare the request for this forward. I'm a bit stuck though on my subclassing. It seems like I'd need some sort of factory to get the right helper class for my application, if I don't want to subclass all my actions as well. Am I making sense at all here? Any thoughts?
Nick
--------------------------------------------------------------------- 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]

