/** * Creates a new button for {@link IWizardModel#next()}. * * @param id the button's id * @param wizard the {@link IWizard} * @return a new {@code NextButton} */ protected WizardButton newNextButton(final String id, final IWizard wizard) { return new NextButton(id, wizard); }
@Override protected void onConfigure() { super.onConfigure(); setEnabled(getWizardModel().isNextAvailable()); }
/** * @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)); } }
/** * @see org.apache.wicket.Component#onBeforeRender() */ @Override protected void onBeforeRender() { getForm().setDefaultButton(this); super.onBeforeRender(); } }
/** * @see org.apache.wicket.Component#isEnabled() */ @Override public boolean isEnabled() { return getWizardModel().isNextAvailable(); }
/** * @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)); } }
/** * @see org.apache.wicket.Component#onBeforeRender() */ @Override protected void onBeforeRender() { getForm().setDefaultButton(this); super.onBeforeRender(); } }
/** * Construct. * * @param id * The component id * @param wizard * The containing wizard */ public WizardButtonBar(String id, IWizard wizard) { super(id); add(new PreviousButton("previous", wizard)); add(new NextButton("next", wizard)); add(new LastButton("last", wizard)); add(new CancelButton("cancel", wizard)); add(new FinishButton("finish", wizard)); }