Module org.apache.wicket.extensions
Class AjaxDisableComponentListener
java.lang.Object
org.apache.wicket.ajax.attributes.AjaxCallListener
org.apache.wicket.extensions.ajax.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:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringgenerateHandlerJavaScript(org.apache.wicket.Component component, boolean disabled) Generate the proper enable/disable JavaScript code for the given component.getBeforeHandler(org.apache.wicket.Component component) getCompleteHandler(org.apache.wicket.Component component) getFailureHandler(org.apache.wicket.Component component) Methods inherited from class org.apache.wicket.ajax.attributes.AjaxCallListener
getAfterHandler, getBeforeSendHandler, getDoneHandler, getInitHandler, getPrecondition, getSuccessHandler, onAfter, onBefore, onBeforeSend, onComplete, onDone, onFailure, onInit, onPrecondition, onSuccess, renderHead
-
Constructor Details
-
AjaxDisableComponentListener
public AjaxDisableComponentListener()
-
-
Method Details
-
getBeforeHandler
- Specified by:
getBeforeHandlerin interfaceorg.apache.wicket.ajax.attributes.IAjaxCallListener- Overrides:
getBeforeHandlerin classorg.apache.wicket.ajax.attributes.AjaxCallListener
-
getCompleteHandler
- Specified by:
getCompleteHandlerin interfaceorg.apache.wicket.ajax.attributes.IAjaxCallListener- Overrides:
getCompleteHandlerin classorg.apache.wicket.ajax.attributes.AjaxCallListener
-
getFailureHandler
- Specified by:
getFailureHandlerin interfaceorg.apache.wicket.ajax.attributes.IAjaxCallListener- Overrides:
getFailureHandlerin classorg.apache.wicket.ajax.attributes.AjaxCallListener
-
generateHandlerJavaScript
Generate the proper enable/disable JavaScript code for the given component. By default component is enabled/disabled using DOM attribute 'disabled'.
-