public class AjaxDisableComponentListener extends AjaxCallListener
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.Constructor and Description |
---|
AjaxDisableComponentListener() |
Modifier and Type | Method and Description |
---|---|
protected String |
generateHandlerJavaScript(Component component,
boolean disabled)
Generate the proper enable/disable JavaScript code for the given component.
|
CharSequence |
getBeforeHandler(Component component)
The JavaScript that will be executed before the Ajax call, as early as possible.
|
CharSequence |
getCompleteHandler(Component component)
The JavaScript that will be executed after both successful and unsuccessful return of the
Ajax call.
|
CharSequence |
getFailureHandler(Component component)
The JavaScript that will be executed after unsuccessful return of the Ajax call.
|
getAfterHandler, getBeforeSendHandler, getDoneHandler, getInitHandler, getPrecondition, getSuccessHandler, onAfter, onBefore, onBeforeSend, onComplete, onDone, onFailure, onInit, onPrecondition, onSuccess, renderHead
public CharSequence getBeforeHandler(Component component)
IAjaxCallListener
getBeforeHandler
in interface IAjaxCallListener
getBeforeHandler
in class AjaxCallListener
component
- the Component with the Ajax behaviorpublic CharSequence getCompleteHandler(Component component)
IAjaxCallListener
getCompleteHandler
in interface IAjaxCallListener
getCompleteHandler
in class AjaxCallListener
component
- the Component with the Ajax behaviorpublic CharSequence getFailureHandler(Component component)
IAjaxCallListener
getFailureHandler
in interface IAjaxCallListener
getFailureHandler
in class AjaxCallListener
component
- the Component with the Ajax behaviorCopyright © 2006–2022 Apache Software Foundation. All rights reserved.