| wicket.behavior.AbstractAjaxBehavior wicket.ajax.AbstractDefaultAjaxBehavior
All known Subclasses: wicket.extensions.ajax.markup.html.autocomplete.AbstractAutoCompleteBehavior, wicket.ajax.AjaxEventBehavior, wicket.ajax.AbstractAjaxTimerBehavior,
AbstractDefaultAjaxBehavior | abstract public class AbstractDefaultAjaxBehavior extends AbstractAjaxBehavior (Code) | | The base class for Wicket's default AJAX implementation.
since: 1.2 author: Igor Vaynberg (ivaynberg) |
getAjaxCallDecorator | protected IAjaxCallDecorator getAjaxCallDecorator()(Code) | | ajax call decorator used to decorate the call generated by thisbehavior or null for none |
getCallbackScript | protected CharSequence getCallbackScript()(Code) | | javascript that will generate an ajax GET request to thisbehavior |
getCallbackScript | protected CharSequence getCallbackScript(boolean recordPageVersion, boolean onlyTargetActivePage)(Code) | | javascript that will generate an ajax GET request to thisbehavior * Parameters: recordPageVersion - if true the url will be encoded to execute on the current pageversion, otherwise url will be encoded to execute on thelatest page version Parameters: onlyTargetActivePage - if true the callback to this behavior will be ignore if thepage is not the last one the user accessed |
getCallbackScript | protected CharSequence getCallbackScript(CharSequence partialCall, CharSequence onSuccessScript, CharSequence onFailureScript)(Code) | | Returns javascript that performs an ajax callback to this behavior. The
script is decorated by the ajax callback decorator from
AbstractDefaultAjaxBehavior.getAjaxCallDecorator .
Parameters: partialCall - Javascript of a partial call to the function performing theactual ajax callback. Must be in formatfunction(params, with signaturefunction(params, onSuccessHandler, onFailureHandler .Example: wicketAjaxGet('callbackurl' Parameters: onSuccessScript - javascript that will run when the ajax call finishessuccessfully Parameters: onFailureScript - javascript that will run when the ajax call finishes with anerror status script that peforms ajax callback to this behavior |
throttleScript | final public static CharSequence throttleScript(CharSequence script, String throttleId, Duration throttleDelay)(Code) | | Wraps the provided javascript with a throttled block. Throttled behaviors
only execute once within the given delay even though they are 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 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 with ajax calls.
Parameters: script - javascript to be throttled Parameters: throttleId - the id of the throttle to be used. Usually this should remainconstant for the same javascript block. Parameters: throttleDelay - time span within which the javascript block will only executeonce wrapped javascript |
|
|