1 // Copyright 2004-2007 Castle Project - http://www.castleproject.org/
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
7 // http://www.apache.org/licenses/LICENSE-2.0
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
15 namespace TestSiteNVelocity
.Controllers
18 using Castle
.MonoRail
.Framework
;
20 [DynamicActionProvider(typeof(WizardActionProvider
))]
21 [ControllerDetails(Area
="wizard")]
22 public class TestWizardWithAreaController
: Controller
, IWizardController
29 public void OnWizardStart()
33 public bool OnBeforeStep(String wizardName
, String stepName
, WizardStepPage step
)
38 public void OnAfterStep(String wizardName
, String stepName
, WizardStepPage step
)
43 public WizardStepPage
[] GetSteps(IRailsEngineContext context
)
45 return new WizardStepPage
[] { new Page1(), new Page2(), new Page3(), new Page4() }
;
48 public class Page1
: WizardStepPage
50 public void InnerAction()
52 Flash
["InnerActionInvoked"] = true;
54 RenderText("InnerAction contents");
57 public void InnerAction2()
62 public class Page2
: WizardStepPage
64 protected override void RenderWizardView()
66 RenderText("A content rendered using RenderText");
70 public class Page3
: WizardStepPage
72 protected override void RenderWizardView()
78 public class Page4
: WizardStepPage
80 public void InnerAction()
82 Flash
["InnerActionInvoked"] = true;