com.ozziefix.jlwizard.demo
Class MaybeEmployeeAction

java.lang.Object
  extended by com.ozziefix.jlwizard.demo.MaybeEmployeeAction
All Implemented Interfaces:
WizardAction

public class MaybeEmployeeAction
extends java.lang.Object
implements WizardAction

WizardAction for demonstrating branching in a Wizard.

The PageForward this WizardAction returns depends on the value of the employee property of the DemoWizardModel.

Version:
$Revision: 1.1 $
Author:
Jurgen Lust

Constructor Summary
MaybeEmployeeAction(java.lang.String employeeForward, java.lang.String noEmployeeForward)
          Creates a new MaybeEmployeeAction object.
 
Method Summary
 java.lang.String getDescription()
           the description of this action
 java.lang.String getTitle()
           the title of this action.
 PageForward perform(Wizard wizard, WizardModel model)
           perform the action.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MaybeEmployeeAction

public MaybeEmployeeAction(java.lang.String employeeForward,
                           java.lang.String noEmployeeForward)
Creates a new MaybeEmployeeAction object.

Parameters:
employeeForward - the identifier of the forward when employee = true
noEmployeeForward - the identifier of the forward when employee = false
Method Detail

getDescription

public java.lang.String getDescription()
Description copied from interface: WizardAction

the description of this action

Specified by:
getDescription in interface WizardAction
Returns:
the description of the action
See Also:
WizardAction.getDescription()

getTitle

public java.lang.String getTitle()
Description copied from interface: WizardAction

the title of this action. This could used for the button text on the WizardNavigator.

Specified by:
getTitle in interface WizardAction
Returns:
the title of the action
See Also:
WizardAction.getTitle()

perform

public PageForward perform(Wizard wizard,
                           WizardModel model)
                    throws WizardException
Description copied from interface: WizardAction

perform the action. This should only be called from the perform() method of the Wizard.

Specified by:
perform in interface WizardAction
Parameters:
wizard - the wizard that called this action
model - the wizard model this action will work with
Returns:
the forward to another page in the wizard
Throws:
WizardException - when something went wrong while performing the action
See Also:
WizardAction.perform(com.ozziefix.jlwizard.Wizard, com.ozziefix.jlwizard.WizardModel)


Copyright © 2004 - 2005 by Jurgen Lust.