 |
Wizard Events
Every wizard has four standard events:
- Next step
- Previous step
- Cancel wizard
- Finish wizard
From user's point of view, events are triggered by clicking a button on HTML form in a browser. Wizard Manager, which provides integration with each particuar web framework, handles button clicks and calls Rule Engine methods accordingly.
Next//Done
This event is triggered when a user clicks "Next" button. The actual button name can be different, but by convention "Next" or "Forward" button should be used on all wizard pages except the last one, which should have "Finish" or "Done" button. Despite of the button caption, they call same Rule Engine method, which tries to move forward from the current step. If current step is the last step, wizard is finished and disposed.
It is possible to establish an event listener, which would intercept this event and prevent a wizard from moving to next step or from closing. If wizard moves forward from any step but last, then onTransition(STEP_REGULAR) is triggered. If wizard is about to move from the last step effectively finishing wizard, then onTransition(STEP_LAST) is triggered.
Previous
This event is triggered when a user clicks "Back" or "Previous" button. The actual button name can be different. Rule Engine tries to move one step back. If it is possible, it moves back unconditionally and no events are generated.
Cancel
This event is triggered when a user clicks "Cancel" button. The actual button name can be different. "Cancel" button disposes the wizard, after which Wizard Manager relinquishes control to another component of application. What happens if a user navigates back to wizard location after wizard was disposed, is undefined and depends on concrete implementation.
|