Example usage for org.apache.wicket.extensions.wizard IWizardModel isLastStep

List of usage examples for org.apache.wicket.extensions.wizard IWizardModel isLastStep

Introduction

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

Prototype

boolean isLastStep(IWizardStep step);

Source Link

Document

Gets whether the specified step is the last step in the wizard.

Usage

From source file:au.org.theark.core.web.component.wizard.AjaxWizardButtonBar.java

License:Open Source License

/**
 * @see org.apache.wicket.extensions.wizard.IDefaultButtonProvider#getDefaultButton(org.apache.wicket.extensions.wizard.IWizardModel)
 *///from   ww  w .j  a  v  a 2  s . co  m
public IFormSubmittingComponent getDefaultButton(IWizardModel model) {
    if (model.isNextAvailable()) {
        return (Button) get("next");
    } else if (model.isLastAvailable()) {
        return (Button) get("last");
    } else if (model.isLastStep(model.getActiveStep())) {
        return (Button) get("finish");
    }
    return null;
}