Hi,
There are certain things I wld want to point out:
Lets assume you have page1 ,page2 and page3 as part of wizard. Page1 has
a next button, page2 has next & back and page3 has back & submit button.

I would create a formbean which contains attributes for all the 3 pages
and define the formbean to be session scope.
Also I would create one action class and write methods for all the
actions triggered from wizard screens

Code wld be like this:

Struts-config.xml

  <form-beans>
    <form-bean name="WizardActionForm" type="WizardActionForm"/>
  </form-beans>
  <action-mappings type="org.apache.struts.action.ActionMapping">
      <action path="page1next"
              type="WizardAction"
              input="page1.jsp"
              scope="session" parameter="page1next" validate="true">
        <forward name="success"
                 path="page2.jsp"/>
      </action>
      <action path="page2next"
              type="WizardAction"
              input="page2.jsp"
              scope="session" parameter="page2next" validate="true">
        <forward name="success"
                 path="page2.jsp"/>
      </action>
      <action path="page3submit"
              type="WizardAction"
              input="page3.jsp"
              scope="session" parameter="page3submit" validate="true">
        <forward name="success"
                 path="page3.jsp"/>
      </action>
      <action path="page2back"
              type="WizardAction"
              input="page2.jsp"
              scope="session" parameter="page2back" validate="true">
        <forward name="success"
                 path="page2.jsp"/>
      </action>
      <action path="page3back"
              type="WizardAction"
              input="page3.jsp"
              scope="session" parameter="page3back" validate="true">
        <forward name="success"
                 path="page3.jsp"/>
      </action>
  </action-mappings>

Assuming the actions for next and back on page2 are named page2next and
page2back respectively
similarly the action names for the rest of the pages as well

The action class WizardAction wld have methods
page1next,page2next,page3submit,page2back,page3back

Hope this helps 

Thanks,
Satish
-----Original Message-----
From: Derek [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 12, 2004 2:14 AM
To: [EMAIL PROTECTED]
Subject: struts workflow extension: help on workflow violation handling


I need some guidance and/or an example of how to achieve this...

I have a multi-page wizard that uses a form bean (in the session) per
page.  "Next" and "Back" buttons submit to the same Action which is
necessary to save all data entered into the form beans.  On a workflow
violation, I want the user to remain on the same wizard page that they
were on and just display a message about the violation.  It seems that
when any violation occurs, no matter which page the user is on, the
violation "handler" is called, the data in the session is removed and
all workflows and states are removed.  When running the demo
application, it seems that the behavior is what I want but I can't seem
to duplicate it in my application. Any help would be greatly
appreciated.  derek


---------------------------------------------------------------------
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]

Reply via email to