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 TestSiteWindsor
.Controllers
19 using Castle
.MicroKernel
;
20 using Castle
.MonoRail
.Framework
;
23 [DynamicActionProvider( typeof(WizardActionProvider
) ), Serializable
]
24 public class TestWizardController
: Controller
, IWizardController
26 private readonly IKernel kernel
;
28 public TestWizardController(IKernel kernel
)
38 public void OnWizardStart()
42 public bool OnBeforeStep(String wizardName
, String stepName
, WizardStepPage step
)
47 public void OnAfterStep(String wizardName
, String stepName
, WizardStepPage step
)
51 public WizardStepPage
[] GetSteps(IRailsEngineContext context
)
53 return new WizardStepPage
[]
55 (WizardStepPage
) kernel
[typeof(Page1
)],
56 (WizardStepPage
) kernel
[typeof(Page2
)],
57 (WizardStepPage
) kernel
[typeof(Page3
)],
58 (WizardStepPage
) kernel
[typeof(Page4
)],
63 public class Page1
: WizardStepPage
65 public void InnerAction()
67 Flash
["InnerActionInvoked"] = true;
69 RenderText("InnerAction contents");
72 public void InnerAction2()
77 public class Page2
: WizardStepPage
79 protected override void RenderWizardView()
81 RenderText("A content rendered using RenderText");
85 public class Page3
: WizardStepPage
87 protected override void RenderWizardView()
93 public class Page4
: WizardStepPage
95 public void InnerAction()
97 Flash
["InnerActionInvoked"] = true;