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 public class TestWizardConditionsController
: Controller
, IWizardController
28 public void OnWizardStart()
32 public bool OnBeforeStep(String wizardName
, String stepName
, WizardStepPage step
)
37 public void OnAfterStep(String wizardName
, String stepName
, WizardStepPage step
)
42 public WizardStepPage
[] GetSteps(IRailsEngineContext context
)
44 return new WizardStepPage
[] { new Page1() }
;
47 public class Page1
: WizardStepPage
49 protected override bool IsPreConditionSatisfied(IRailsEngineContext context
)
51 bool isOk
= Query
["id"] == "1";
55 Redirect("TestWizardConditions", "Index");
61 public void InnerAction()
63 Flash
["InnerActionInvoked"] = true;
65 RenderText("InnerAction contents");
68 public void InnerAction2()