Check out the wizard sample from Struts Dialogs 2.0 It uses EventActionDispatcher renamed to EventDispatcher, but you can use standard EventActionDispatcher with the same result: https://sourceforge.net/project/showfiles.php?group_id=49385&package_id=154597
It behaves like this one: http://www.superinterface.com/strutsdialog/wizardaction.do Maybe you like it. On 5/6/06, Jakub Milkiewicz <[EMAIL PROTECTED]> wrote:
Hi I am creating wizzard application that contains 5 screens. It looks like: Action -> jsp ->Action -> jsp ->Action ->jsp ... I also use autovalidation. All my actions are setup actions (as Michael Jouravlev suggests). So if i submit a form from jsp to some Action and validation fails struts forwards me where input parameter for Action points. I need to be forwarder to previous action (to setup Action) that will prepare my view (for example retrieve some data from DB) and then shows me my invalid form/jsp. Because all my jsps contain 2 buttons: next and back i decided that all my actions will extends EventDispatchAction, so if validations fails i wanna to be forwarded to previous action next() method. One soultion i found is to add extra parameters to forward paths in struts configuration file: <action name="viewBean" path="/showStep3" scope="session" type=" foo.bar.ShowStep3" input="/showStep2.do?next=true" parameter="next,back"> <forward name="success" path="/step3.jsp" contextRelative="true"> </forward> <forward contextRelative="true" name="back" path="/showStep1.do?next=true"> </forward> </action> Is it good idea?? Does anyone have another solution?? Maybe EventDispatchAction shouldn't be used in my case...
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]