Example usage for org.apache.wicket.ajax.attributes AjaxCallListener onFailure

List of usage examples for org.apache.wicket.ajax.attributes AjaxCallListener onFailure

Introduction

In this page you can find the example usage for org.apache.wicket.ajax.attributes AjaxCallListener onFailure.

Prototype

public AjaxCallListener onFailure(final CharSequence failure) 

Source Link

Document

Sets the JavaScript code that will be returned by #getFailureHandler(Component) .

Usage

From source file:com.googlecode.wicket.jquery.ui.widget.dialog.ButtonAjaxBehavior.java

License:Apache License

@Override
protected void updateAjaxAttributes(AjaxRequestAttributes attributes) {
    super.updateAjaxAttributes(attributes);

    if (this.button.isIndicating()) {
        AjaxCallListener ajaxCallListener = new AjaxCallListener();
        ajaxCallListener.onBefore(this.getBeforeStatement());
        ajaxCallListener.onSuccess(this.getFinishStatement());
        ajaxCallListener.onFailure(this.getFinishStatement());

        attributes.getAjaxCallListeners().add(ajaxCallListener);
    }//w  w w . jav  a 2  s. c o  m
}