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
AnAjaxCallListenerto 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 overridegenerateHandlerJavaScript(org.apache.wicket.Component, boolean)to generate the proper enable/disable JavaScript.- Author:
- Andrea Del Bene
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AjaxDisableComponentListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringgenerateHandlerJavaScript(org.apache.wicket.Component component, boolean disabled)Generate the proper enable/disable JavaScript code for the given component.CharSequencegetBeforeHandler(org.apache.wicket.Component component)CharSequencegetCompleteHandler(org.apache.wicket.Component component)CharSequencegetFailureHandler(org.apache.wicket.Component component)
-
-
-
Constructor Detail
-
AjaxDisableComponentListener
public AjaxDisableComponentListener()
-
-
Method Detail
-
getBeforeHandler
public CharSequence getBeforeHandler(org.apache.wicket.Component component)
- Specified by:
getBeforeHandlerin interfaceorg.apache.wicket.ajax.attributes.IAjaxCallListener- Overrides:
getBeforeHandlerin classorg.apache.wicket.ajax.attributes.AjaxCallListener
-
getCompleteHandler
public CharSequence getCompleteHandler(org.apache.wicket.Component component)
- Specified by:
getCompleteHandlerin interfaceorg.apache.wicket.ajax.attributes.IAjaxCallListener- Overrides:
getCompleteHandlerin classorg.apache.wicket.ajax.attributes.AjaxCallListener
-
getFailureHandler
public CharSequence getFailureHandler(org.apache.wicket.Component component)
- Specified by:
getFailureHandlerin interfaceorg.apache.wicket.ajax.attributes.IAjaxCallListener- Overrides:
getFailureHandlerin classorg.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'.
-
-