lizz wrote:
>
> I really dont want to add more steps that the ones I already have. for the
> case when step c is no longer valid I woild like the next button to be
> disabled and the finish button to be enabled. Isn't there a method for
> updating the button panel?
>
As I said, you can enable wantOnSelectionChangedNotifications() to refresh
the whole page. Here
is some sample code:
public class WizardTest extends WebPage {
private String selected = "A";
public WizardTest() {
WizardModel wizardModel = new WizardModel();
wizardModel.addListener(new IWizardModelListener() {
public void onFinish() {
setResponsePage(Completed.class);
}
public void onCancel() {
}
public void onActiveStepChanged(IWizardStep newStep) {
}
});
wizardModel.add(new MyStep("a"));
wizardModel.add(new MyStep2(new PropertyModel(this,
"selected")));
wizardModel.add(new MyStep("c"), new ICondition() {
public boolean evaluate() {
return "A".equals(selected);
}
});
Wizard w = new Wizard("w", wizardModel);
add(w);
}
}
public class MyStep2 extends WizardStep {
public MyStep2(IModel model) {
List options = new ArrayList();
options.add("A");
options.add("B");
add(new DropDownChoice("s", model, options) {
protected boolean wantOnSelectionChangedNotifications()
{
return true;
}
});
}
}
--
View this message in context:
http://www.nabble.com/How-do-I-force-evaluate-in-a-Wizard-steps-condition-to-run--tf4545108.html#a12991207
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]