You can try something like the Interceptor pattern. For a specific request,
register a series of command classes with a Manager. The Manager calls each
interceptor in the order specified. This way you can add commands ( steps )
without changing existing code. Almost like Struts Action
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 =
Depending on your appetite for the cutting edge, you may want to
investigate struts-chain, which is currently in contrib, but which
is targeted for replacing the current RequestProcessor on a Struts
1.3.x timeframe (which will probably begin in earnest shortly after
the move to Apache TLP
Thats exactly what I'm talking about, except WizardSupport would also do
some work setting up the request for the next forward.
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
4 matches
Mail list logo