Example usage for org.apache.wicket.extensions.wizard WizardButton getDefaultFormProcessing

List of usage examples for org.apache.wicket.extensions.wizard WizardButton getDefaultFormProcessing

Introduction

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

Prototype

@Override
public final boolean getDefaultFormProcessing() 

Source Link

Document

Gets the defaultFormProcessing property.

Usage

From source file:org.apache.syncope.client.console.wizards.AjaxWizardMgtButtonBar.java

License:Apache License

private void ajaxify(final WizardButton button) {
    button.add(new AjaxFormSubmitBehavior("click") {

        private static final long serialVersionUID = 1L;

        @Override/*from w  w  w .ja v  a  2 s .c  o m*/
        protected void updateAjaxAttributes(final AjaxRequestAttributes attributes) {
            super.updateAjaxAttributes(attributes);

            AjaxWizardMgtButtonBar.this.updateAjaxAttributes(attributes);
        }

        @Override
        public boolean getDefaultProcessing() {
            return button.getDefaultFormProcessing();
        }

        @Override
        protected void onSubmit(final AjaxRequestTarget target) {
            target.add(findParent(Wizard.class));
            button.onSubmit();
        }

        @Override
        protected void onAfterSubmit(final AjaxRequestTarget target) {
            button.onAfterSubmit();
        }

        @Override
        protected void onError(final AjaxRequestTarget target) {
            target.add(findParent(Wizard.class));
            button.onError();
            ((BasePage) getPage()).getNotificationPanel().refresh(target);
        }

        @Override
        protected void onComponentTag(final ComponentTag tag) {
            tag.put("type", "button");
        }
    });
}