/** * Returns true if all the steps in the wizard return <tt>true</tt> from * {@link IWizardStep#isComplete}. This is primarily used to determine if the last button can be * enabled. * * @return <tt>true</tt> if all the steps in the wizard are complete, <tt>false</tt> otherwise. */ protected final boolean allStepsComplete() { for (IWizardStep step : steps) { if (!step.isComplete()) { return false; } } return true; }
/** * @see org.apache.wicket.extensions.wizard.IWizardModelListener#onActiveStepChanged(org.apache.wicket.extensions.wizard.IWizardStep) */ @Override public void onActiveStepChanged(final IWizardStep newStep) { form.replace(newStep.getView(VIEW_ID, this, this)); form.replace(newStep.getHeader(HEADER_ID, this, this)); }
@Override protected void onClick(AjaxRequestTarget target, Form form) { IWizardModel wizardModel = getWizardModel(); IWizardStep step = wizardModel.getActiveStep(); // let the step apply any state step.applyState(); // if the step completed after applying the state, move the model onward if (step.isComplete()) { wizardModel.next(); } else { error(getLocalizer().getString( "org.apache.wicket.extensions.wizard.NextButton.step.did.not.complete", this)); } target.addComponent(wizard); }
@Override protected void onSubmit(AjaxRequestTarget target, DialogButton button) { // If the clicked button was a form-submitter, calls step#applyState() // IWizardModel wizardModel = this.getWizardModel(); wizardModel.getActiveStep().applyState(); }
/** * @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()); }
@Override protected void onClick(AjaxRequestTarget target, Form form) { IWizardModel wizardModel = getWizardModel(); IWizardStep step = wizardModel.getActiveStep(); // let the step apply any state step.applyState(); // if the step completed after applying the state, move the model onward if (step.isComplete()) { wizardModel.next(); } else { error(getLocalizer().getString( "org.apache.wicket.extensions.wizard.NextButton.step.did.not.complete", this)); } target.add(wizard); }
@Override protected void onSubmit(AjaxRequestTarget target) { /* If the clicked button is a form-submitter, calls step#applyState() */ IWizardModel wizardModel = this.getWizardModel(); wizardModel.getActiveStep().applyState(); }
(stepsIterator.next()).init(wizardModel);
@Override protected void onClick(AjaxRequestTarget target, Form form) { IWizardModel wizardModel = getWizardModel(); IWizardStep step = wizardModel.getActiveStep(); // let the step apply any state step.applyState(); // if the step completed after applying the state, move the model onward if (step.isComplete()) { wizardModel.next(); } else { error(getLocalizer().getString( "org.apache.wicket.extensions.wizard.NextButton.step.did.not.complete", this)); } target.add(wizard); } }
/** * @see org.apache.wicket.extensions.wizard.IWizardModelListener#onActiveStepChanged(org.apache.wicket.extensions.wizard.IWizardStep) */ public void onActiveStepChanged(IWizardStep newStep) { form.replace(newStep.getView(VIEW_ID, this, this)); form.replace(newStep.getHeader(HEADER_ID, this, this)); }
/** * @see org.apache.wicket.extensions.wizard.WizardButton#onClick() */ @Override public void onClick() { IWizardModel wizardModel = getWizardModel(); wizardModel.getActiveStep().applyState(); wizardModel.last(); } }
/** * Returns true if all the steps in the wizard return <tt>true</tt> from * {@link IWizardStep#isComplete}. This is primarily used to determine if the last button can be * enabled. * * @return <tt>true</tt> if all the steps in the wizard are complete, <tt>false</tt> otherwise. */ protected final boolean allStepsComplete() { for (IWizardStep step : steps) { if (!step.isComplete()) { return false; } } return true; }
@Override protected void onClick(AjaxRequestTarget target, Form form) { IWizardModel wizardModel = getWizardModel(); IWizardStep step = wizardModel.getActiveStep(); // let the step apply any state step.applyState(); // if the step completed after applying the state, notify the wizard if (step.isComplete()) { getWizardModel().finish(); } else { error(getLocalizer().getString( "org.apache.wicket.extensions.wizard.FinishButton.step.did.not.complete", this)); } } }
/** * @see org.apache.wicket.extensions.wizard.WizardButton#onClick() */ @Override public void onClick() { IWizardModel wizardModel = getWizardModel(); wizardModel.getActiveStep().applyState(); wizardModel.last(); } }
/** * 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); }
@Override protected void onClick(AjaxRequestTarget target, Form form) { IWizardModel wizardModel = getWizardModel(); IWizardStep step = wizardModel.getActiveStep(); // let the step apply any state step.applyState(); // if the step completed after applying the state, notify the wizard if (step.isComplete()) { getWizardModel().finish(); } else { error(getLocalizer().getString( "org.apache.wicket.extensions.wizard.FinishButton.step.did.not.complete", this)); } // target.addComponent(wizard); } });
/** * 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); }
/** * @see org.apache.wicket.extensions.wizard.WizardButton#onClick() */ @Override public void onClick() { IWizardModel wizardModel = getWizardModel(); IWizardStep step = wizardModel.getActiveStep(); // let the step apply any state step.applyState(); // if the step completed after applying the state, move the // model onward if (step.isComplete()) { wizardModel.next(); } else { error(getLocalizer().getString( "org.apache.wicket.extensions.wizard.NextButton.step.did.not.complete", this)); } }