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

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

Introduction

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

Prototype

public AjaxCallListener onSuccess(final CharSequence success) 

Source Link

Document

Sets the JavaScript code that will be returned by #getSuccessHandler(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);
    }/*from www . j  a  v a 2s .c o m*/
}