Example usage for org.apache.wicket.extensions.wizard WizardModel add

List of usage examples for org.apache.wicket.extensions.wizard WizardModel add

Introduction

In this page you can find the example usage for org.apache.wicket.extensions.wizard WizardModel add.

Prototype

public void add(final IWizardStep step, final ICondition condition) 

Source Link

Document

Adds an optional step to the model.

Usage

From source file:ro.nextreports.server.web.schedule.ScheduleWizard.java

License:Apache License

private void initWizard() {
    setDefaultModel(new CompoundPropertyModel<ScheduleWizard>(this));

    WizardModel model = new WizardModel();
    model.add(new ScheduleNameStep(), editNotRunNowCondition);
    model.add(new ScheduleRuntimeStep());
    model.add(new ScheduleJobStep(), notRunNowCondition);
    if (moduleLicence.isValid(NextServerModuleLicence.BATCH_MODULE)) {
        model.add(new ScheduleBatchStep());
    }/*from w ww  .  j ava2  s.  c  om*/
    model.add(new ScheduleDestinationsStep());

    if (runNow) {
        finishSteps = new int[] { 1, 2, 3 };
    } else {
        finishSteps = new int[] { 2, 3, 4 };
    }

    // initialize the wizard with the wizard model we just built
    init(model);
}