List of usage examples for org.apache.wicket.extensions.wizard IWizardStep applyState
void applyState();
From source file:com.antilia.web.wizard.AjaxFinishButton.java
License:Apache License
@Override protected void onClick(AjaxRequestTarget target, Form<?> form) { IWizardModel wizardModel = getWizardModel(); IWizardStep step = wizardModel.getActiveStep(); // let the step apply any state step.applyState(); if (step instanceof IValidatableStep) { IValidatableStep validatableStep = (IValidatableStep) step; if (!validatableStep.isValid()) { AjaxWizard ajaxWizard = findParent(AjaxWizard.class); target.addComponent(ajaxWizard); return; }//from ww w .j a v a 2 s.com } // 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)); } }
From source file:com.antilia.web.wizard.AjaxNextButton.java
License:Apache License
@Override protected void onClick(AjaxRequestTarget target, Form<?> form) { IWizardModel wizardModel = getWizardModel(); IWizardStep step = wizardModel.getActiveStep(); // let the step apply any state step.applyState(); if (step instanceof IValidatableStep) { IValidatableStep validatableStep = (IValidatableStep) step; if (!validatableStep.isValid()) { AjaxWizard ajaxWizard = findParent(AjaxWizard.class); target.addComponent(ajaxWizard); return; }/*from w w w. j a v a 2 s. c o m*/ } // 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)); } }
From source file:com.evolveum.midpoint.web.component.wizard.ResourceWizardPreviousButton.java
License:Apache License
@Override public void onClick() { IWizardModel wizardModel = getWizardModel(); IWizardStep step = wizardModel.getActiveStep(); step.applyState(); super.onClick(); }
From source file:ro.nextreports.server.web.common.misc.AjaxWizardFinishButton.java
License:Apache License
/** * @see org.apache.wicket.extensions.wizard.WizardButton#onClick() *///from w w w . java2 s . c o m @Override public 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.add((Wizard) getWizard()); }