C# Class Castle.MonoRail.Framework.WizardActionProvider

Provide easy to use Wizard-like support.
MonoRail uses the DynamicAction infrastructure to provide wizard support so we dont force the programmer to inherit from a specific Controller which can be quite undesirable in real world projects.

Nevertheless we do require that the programmer implements IWizardController on the wizard controller.

Inheritance: IDynamicActionProvider, IDynamicAction
Show file Open project: nats/castle-1.0.3-mono

Public Methods

Method Description
Execute ( Controller controller ) : void

Invoked as "start" action

IncludeActions ( Controller controller ) : void

Implementation of IDynamicActionProvider.

Grab all steps related to the wizard and register them as dynamic actions.

WizardActionProvider ( ) : System

Initializes a new instance of the WizardActionProvider class.

Protected Methods

Method Description
EmptyAction ( Controller controller ) : void

Represents an empty (no-op) action.

HasRequiredSessionData ( Controller controller ) : bool

Determines whether all wizard specific information is on the user session.

ResetSteps ( Controller controller ) : void

Resets the steps by invoking WizardStepPage.Reset on all steps instances.

StartWizard ( Controller controller, bool redirect ) : void

Starts the wizard by adding the required information to the session and invoking IWizardController.OnWizardStart and detecting the first step.

Private Methods

Method Description
ObtainRequestedAction ( String action, String &innerAction ) : String
OnStepActionRequested ( Controller controller ) : void

Invoked when a step is accessed on the url, i.e. http://host/mywizard/firststep.rails and when an inner action is invoked like http://host/mywizard/firststep-save.rails

SetUpWizardHelper ( Controller controller ) : void

Method Details

EmptyAction() protected method

Represents an empty (no-op) action.
protected EmptyAction ( Controller controller ) : void
controller Controller The controller.
return void

Execute() public method

Invoked as "start" action
public Execute ( Controller controller ) : void
controller Controller
return void

HasRequiredSessionData() protected method

Determines whether all wizard specific information is on the user session.
protected HasRequiredSessionData ( Controller controller ) : bool
controller Controller The controller.
return bool

IncludeActions() public method

Implementation of IDynamicActionProvider.

Grab all steps related to the wizard and register them as dynamic actions.

public IncludeActions ( Controller controller ) : void
controller Controller Wizard controller (must implement
return void

ResetSteps() protected method

Resets the steps by invoking WizardStepPage.Reset on all steps instances.
protected ResetSteps ( Controller controller ) : void
controller Controller The controller.
return void

StartWizard() protected method

Starts the wizard by adding the required information to the session and invoking IWizardController.OnWizardStart and detecting the first step.
protected StartWizard ( Controller controller, bool redirect ) : void
controller Controller The controller.
redirect bool if set to true, a redirect /// will be issued to the first step.
return void

WizardActionProvider() public method

Initializes a new instance of the WizardActionProvider class.
public WizardActionProvider ( ) : System
return System