tapestry.fx

Provides handling of effects applied before, during or after an XHR request/response.

Summary
tapestry.fxProvides handling of effects applied before, during or after an XHR request/response.
Properties
preEffectsContains a reference to all registered pre-effects, i.e.
postEffectsContains a reference to all registered post-effects, i.e.
ajaxStatusAction
Functions
attachPreEffectSchedules the execution of an effect when the specified link is clicked (and thus an XHR request begins).
attachPostEffectSchedules the execution of an effect when the specified content is returned through an XHR response.
removeAllRemoves all registered effects (preEffects and postEffects).
attachAjaxStatusAllows specifying a dom node that will be shown or hidden while ajax requests are in progress or have finished.

Properties

preEffects

Contains a reference to all registered pre-effects, i.e. effects that are executed before an XHR request.

postEffects

Contains a reference to all registered post-effects, i.e. effects that are executed when new content arrives through an XHR response.

ajaxStatusAction

Functions

attachPreEffect

attachPreEffect:function(triggerId,
animationFunc,
async)

Schedules the execution of an effect when the specified link is clicked (and thus an XHR request begins).

See Also

tapestry.fx.attachPostEffect <dojo.lfx.IAnimation>

Parameters

triggerIdThe clientId of the DirectLink that triggers the effect.
animationFuncA function that returns the animation to execute.
asyncBoolean for whether to execute the effect in parallel to the XHR request.  Defaults to false, i.e. the XHR is blocked until the effect ends.

Note

Here’s an example usage: tapestry.fx.attachPreEffect(“DirectLink”, function(){return dojo.lfx.wipeOut(“entry”, 800, dojo.lfx.easeDefault) });

attachPostEffect

attachPostEffect:function(updateId,
animationFunc)

Schedules the execution of an effect when the specified content is returned through an XHR response.

See Also

tapestry.fx.attachPreEffect <dojo.lfx.IAnimation>

Parameters

updateIdThe id of a dom node that (when updated) triggers the effect.
animationFuncA function that returns the animation to execute.

Note

Here’s an example usage: tapestry.fx.attachPostEffect(“entry”, function(){return dojo.lfx.wipeIn(“entry”, 1500, dojo.lfx.easeDefault) });

removeAll

removeAll:function()

Removes all registered effects (preEffects and postEffects).

attachAjaxStatus

attachAjaxStatus:function(a1)

Allows specifying a dom node that will be shown or hidden while ajax requests are in progress or have finished.  Alternatively, one can specify a custom function which will get invoked when an ajax request starts or ends - the first argument to that function will be a boolean corresponding to wheather the status element should be showing or not.

Parameters

a1The dom id to show - hide, or the function to invoke when ajax starts or ends.
attachPreEffect:function(triggerId,
animationFunc,
async)
Schedules the execution of an effect when the specified link is clicked (and thus an XHR request begins).
attachPostEffect:function(updateId,
animationFunc)
Schedules the execution of an effect when the specified content is returned through an XHR response.
removeAll:function()
Removes all registered effects (preEffects and postEffects).
attachAjaxStatus:function(a1)
Allows specifying a dom node that will be shown or hidden while ajax requests are in progress or have finished.