Example usage for org.apache.wicket.extensions.wizard Wizard onCancel

List of usage examples for org.apache.wicket.extensions.wizard Wizard onCancel

Introduction

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

Prototype

@Override
public void onCancel() 

Source Link

Document

Called when the wizard is canceled.

Usage

From source file:cz.zcu.kiv.eegdatabase.wui.components.form.AjaxWizardButtonBar.java

License:Apache License

public AjaxWizardButtonBar(String id, final Wizard wizard) {
    super(id, wizard);

    super.addOrReplace(new AjaxWizardButton("cancel", wizard, "cancel",
            ResourceUtils.getString("general.wizard.cancel.question")) {

        private static final long serialVersionUID = 1L;

        @Override//from  ww w  . ja va2s .  co m
        protected void onClick(AjaxRequestTarget target) {
            wizard.onCancel();
        }

        @Override
        public final boolean isEnabled() {
            return getWizardModel().isCancelVisible();
        }

        @Override
        protected void onError(AjaxRequestTarget target, Form<?> form) {
            wizard.onCancel();
        }

    });

}