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,IAjaxCallListener,IComponentAwareHeaderContributor,org.apache.wicket.util.io.IClusterable
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(Component component, boolean disabled) Generate the proper enable/disable JavaScript code for the given component.getBeforeHandler(Component component) getCompleteHandler(Component component) getFailureHandler(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 interfaceIAjaxCallListener- Overrides:
getBeforeHandlerin classAjaxCallListener
-
getCompleteHandler
- Specified by:
getCompleteHandlerin interfaceIAjaxCallListener- Overrides:
getCompleteHandlerin classAjaxCallListener
-
getFailureHandler
- Specified by:
getFailureHandlerin interfaceIAjaxCallListener- Overrides:
getFailureHandlerin classAjaxCallListener
-
generateHandlerJavaScript
Generate the proper enable/disable JavaScript code for the given component. By default component is enabled/disabled using DOM attribute 'disabled'.
-