/** * Adds the next step to the wizard. If the {@link WizardStep} implements {@link ICondition}, * then this method is equivalent to calling {@link #add(IWizardStep, ICondition) add(step, * (ICondition)step)}. * * @param step * the step to added. */ public void add(IWizardStep step) { if (step instanceof ICondition) add(step, (ICondition)step); else add(step, TRUE); }
/** * Checks if the last button should be enabled. * * @return <tt>true</tt> if the last button should be enabled, <tt>false</tt> otherwise. * @see IWizardModel#isLastVisible */ @Override public boolean isLastAvailable() { return allStepsComplete() && !isLastStep(activeStep); }
/** * @see org.apache.wicket.extensions.wizard.IWizardModel#last() */ @Override public void last() { history.push(getActiveStep()); IWizardStep lastStep = findLastStep(); setActiveStep(lastStep); }
/** * @see org.apache.wicket.extensions.wizard.IWizardModel#next() */ @Override public void next() { history.push(getActiveStep()); IWizardStep step = findNextVisibleStep(); setActiveStep(step); }
public RemodelWizard(String id) { super(id, false); setOutputMarkupId(true); WizardModel model = new WizardModel(); model.add(new Step1()); model.add(new Step2()); init(model); }
/** * @see org.apache.wicket.extensions.wizard.IWizardModel#reset() */ public void reset() { history.clear(); activeStep = null; setActiveStep(findNextVisibleStep()); }
/** * @see org.apache.wicket.extensions.wizard.IWizardModel#isLastStep(org.apache.wicket.extensions.wizard.IWizardStep) */ @Override public boolean isLastStep(final IWizardStep step) { return findLastStep().equals(step); }
/** * @see org.apache.wicket.extensions.wizard.IWizardModel#previous() */ @Override public void previous() { IWizardStep step = history.pop(); setActiveStep(step); }
/** * Checks if the next button should be enabled. * * @return <tt>true</tt> if the next button should be enabled, <tt>false</tt> otherwise. */ @Override public boolean isNextAvailable() { return activeStep.isComplete() && !isLastStep(activeStep); }
/** * Sets the active step. * * @param step * the new active step step. */ public void setActiveStep(final IWizardStep step) { if ((activeStep != null) && (step != null) && activeStep.equals(step)) { return; } activeStep = step; fireActiveStepChanged(step); }
return new AjaxWizard<T>(id, modelObject, buildModelSteps(modelObject, new WizardModel()), mode, this.pageRef) {
/** * @see org.apache.wicket.extensions.wizard.IWizardModel#next() */ public void next() { history.push(getActiveStep()); IWizardStep step = findNextVisibleStep(); setActiveStep(step); }
/** * @see org.apache.wicket.extensions.wizard.IWizardModel#reset() */ @Override public void reset() { history.clear(); activeStep = null; for (IWizardStep step : steps) { step.init(this); } setActiveStep(findNextVisibleStep()); }
/** * @see org.apache.wicket.extensions.wizard.IWizardModel#isLastStep(org.apache.wicket.extensions.wizard.IWizardStep) */ public boolean isLastStep(IWizardStep step) { return findLastStep().equals(step); }
/** * @see org.apache.wicket.extensions.wizard.IWizardModel#previous() */ public void previous() { IWizardStep step = history.pop(); setActiveStep(step); }
/** * Checks if the next button should be enabled. * * @return <tt>true</tt> if the next button should be enabled, <tt>false</tt> otherwise. */ public boolean isNextAvailable() { return activeStep.isComplete() && !isLastStep(activeStep); }
/** * Sets the active step. * * @param step * the new active step step. */ public void setActiveStep(IWizardStep step) { if (activeStep != null && step != null && activeStep.equals(step)) { return; } activeStep = step; fireActiveStepChanged(step); }
/** * Adds the next step to the wizard. If the {@link WizardStep} implements {@link ICondition}, * then this method is equivalent to calling {@link #add(IWizardStep, ICondition) add(step, * (ICondition)step)}. * * @param step * the step to added. */ public void add(final IWizardStep step) { if (step instanceof ICondition) { add(step, (ICondition)step); } else { add(step, TRUE); } }
/** * @see org.apache.wicket.extensions.wizard.IWizardModel#last() */ public void last() { history.push(getActiveStep()); IWizardStep lastStep = findLastStep(); setActiveStep(lastStep); }
/** * Checks if the last button should be enabled. * * @return <tt>true</tt> if the last button should be enabled, <tt>false</tt> otherwise. * @see IWizardModel#isLastVisible */ public boolean isLastAvailable() { return allStepsComplete() && !isLastStep(activeStep); }