Class AjaxDisableComponentListener

  • All Implemented Interfaces:
    Serializable, org.apache.wicket.ajax.attributes.IAjaxCallListener, org.apache.wicket.markup.html.IComponentAwareHeaderContributor, org.apache.wicket.util.io.IClusterable

    public class AjaxDisableComponentListener
    extends org.apache.wicket.ajax.attributes.AjaxCallListener
    An AjaxCallListener to disable the associated component while the AJAX request is running. Please note that under the hood this class uses DOM attribute 'disabled' to disable a component, hence it can be used only with those HTML components that support this attribute. If you want to use it with other kinds of components you should override generateHandlerJavaScript(org.apache.wicket.Component, boolean) to generate the proper enable/disable JavaScript.
    Author:
    Andrea Del Bene
    See Also:
    Serialized Form
    • Method Detail

      • getBeforeHandler

        public CharSequence getBeforeHandler​(org.apache.wicket.Component component)
        Specified by:
        getBeforeHandler in interface org.apache.wicket.ajax.attributes.IAjaxCallListener
        Overrides:
        getBeforeHandler in class org.apache.wicket.ajax.attributes.AjaxCallListener
      • getCompleteHandler

        public CharSequence getCompleteHandler​(org.apache.wicket.Component component)
        Specified by:
        getCompleteHandler in interface org.apache.wicket.ajax.attributes.IAjaxCallListener
        Overrides:
        getCompleteHandler in class org.apache.wicket.ajax.attributes.AjaxCallListener
      • getFailureHandler

        public CharSequence getFailureHandler​(org.apache.wicket.Component component)
        Specified by:
        getFailureHandler in interface org.apache.wicket.ajax.attributes.IAjaxCallListener
        Overrides:
        getFailureHandler in class org.apache.wicket.ajax.attributes.AjaxCallListener
      • generateHandlerJavaScript

        protected String generateHandlerJavaScript​(org.apache.wicket.Component component,
                                                   boolean disabled)
        Generate the proper enable/disable JavaScript code for the given component. By default component is enabled/disabled using DOM attribute 'disabled'.