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
19 using Castle
.MonoRail
.Framework
;
22 [DynamicActionProvider(typeof(WizardActionProvider
))]
23 public class TestWizardController
: Controller
, IWizardController
30 public void OnWizardStart()
34 public bool OnBeforeStep(String wizardName
, String stepName
, WizardStepPage step
)
39 public void OnAfterStep(String wizardName
, String stepName
, WizardStepPage step
)
44 public WizardStepPage
[] GetSteps(IRailsEngineContext context
)
46 return new WizardStepPage
[] { new Page1(), new Page2(), new Page3(), new Page4() }
;
49 public class Page1
: WizardStepPage
51 public void InnerAction()
53 Flash
["InnerActionInvoked"] = true;
55 RenderText("InnerAction contents");
58 public void InnerAction2()
63 public class Page2
: WizardStepPage
65 protected override void RenderWizardView()
67 RenderText("A content rendered using RenderText");
71 public class Page3
: WizardStepPage
73 protected override void RenderWizardView()
79 public class Page4
: WizardStepPage
81 public void InnerAction()
83 Flash
["InnerActionInvoked"] = true;