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

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

Introduction

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

Prototype

boolean isLastAvailable();

Source Link

Document

Checks if the last button should be enabled.

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   w w  w  .ja v  a 2 s .  c  o  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;
}