wicket.ajax.calldecorator
Class AjaxCallThrottlingDecorator
java.lang.Object
wicket.ajax.calldecorator.AjaxPostprocessingCallDecorator
wicket.ajax.calldecorator.AjaxCallThrottlingDecorator
- All Implemented Interfaces:
- java.io.Serializable, IAjaxCallDecorator
public final class AjaxCallThrottlingDecorator
- extends AjaxPostprocessingCallDecorator
Adds throttling to the ajax call. Throttled behaviors only execute once
within the given delay even though they can be triggered multiple times.
For example, this is useful when attaching an event behavior to the
onkeypress event. It is not desirable to have an ajax call made every time
the user types so we can throttle that call to a desirable delay, such as
once per second. This gives us a near real time ability to provide feedback
without overloading the server.
- Since:
- 1.2
- Author:
- Igor Vaynberg (ivaynberg)
- See Also:
- Serialized Form
Method Summary |
java.lang.CharSequence |
postDecorateScript(java.lang.CharSequence script)
Decorates ajax call script |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AjaxCallThrottlingDecorator
public AjaxCallThrottlingDecorator(java.lang.String id,
Duration delay)
- Construct.
- Parameters:
id
- throttle iddelay
- throttle delay
AjaxCallThrottlingDecorator
public AjaxCallThrottlingDecorator(IAjaxCallDecorator decorator,
java.lang.String id,
Duration delay)
- Construct.
- Parameters:
decorator
- wrapped decoratorid
- throttle iddelay
- throttle delay
postDecorateScript
public final java.lang.CharSequence postDecorateScript(java.lang.CharSequence script)
- Description copied from class:
AjaxPostprocessingCallDecorator
- Decorates ajax call script
- Overrides:
postDecorateScript
in class AjaxPostprocessingCallDecorator
- Returns:
- decorated script
- See Also:
AjaxPostprocessingCallDecorator.postDecorateScript(CharSequence)
Copyright © 2004-2007 Wicket developers. All Rights Reserved.