Castle.MonoRail.Framework.WizardActionProvider.OnStepActionRequested C# (CSharp) Method

OnStepActionRequested() private method

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
private OnStepActionRequested ( Controller controller ) : void
controller Controller
return void
		private void OnStepActionRequested(Controller controller)
		{
			if (currentStepInstance != null && !HasRequiredSessionData(controller))
			{
				StartWizard(controller, false);
			}
			
			controller.CancelView();

			IRailsEngineContext context = controller.Context;

			IWizardController wizController = (IWizardController) controller;

			String wizardName = WizardUtils.ConstructWizardNamespace(controller);

			String currentStep = (String) context.Session[wizardName + "currentstep"];

			// The step will inherit the controller property bag,
			// this way filters can pass values to the step property without having to know it
			currentStepInstance.PropertyBag = controller.PropertyBag;

			// If OnBeforeStep returns false we stop
			if (!wizController.OnBeforeStep(wizardName, currentStep, currentStepInstance))
			{
				return;
			}
			
			// Initialize step data so instance members can be used
			// executor.InitializeController(urlInfo.Area, urlInfo.Controller, innerAction);

			// Record the step we're working with
			WizardUtils.RegisterCurrentStepInfo(controller, currentStepInstance.ActionName);

			// The step cannot be accessed in the current state of matters
			if (!currentStepInstance.IsPreConditionSatisfied(controller.Context))
			{
				return;
			}
			
			// Dispatch process
			try
			{
				// TODO: Invoke Whole step here
				// currentStepInstance.Process(controller.Context, 
				//	urlInfo.Area, urlInfo.Controller, innerAction);
				currentStepExecutor.ProcessSelectedAction();
			}
			finally
			{
				wizController.OnAfterStep(wizardName, currentStep, currentStepInstance);

				currentStepExecutor.Dispose();
			}
		}