Provides handling of effects applied before, during or after an XHR request/response.
tapestry.fx | Provides handling of effects applied before, during or after an XHR request/response. |
Properties | |
preEffects | Contains a reference to all registered pre-effects, i.e. |
postEffects | Contains a reference to all registered post-effects, i.e. |
ajaxStatusAction | |
Functions | |
attachPreEffect | Schedules the execution of an effect when the specified link is clicked (and thus an XHR request begins). |
attachPostEffect | Schedules the execution of an effect when the specified content is returned through an XHR response. |
removeAll | Removes all registered effects (preEffects and postEffects). |
attachAjaxStatus | Allows specifying a dom node that will be shown or hidden while ajax requests are in progress or have finished. |
Contains a reference to all registered pre-effects, i.e. effects that are executed before an XHR request.
Contains a reference to all registered post-effects, i.e. effects that are executed when new content arrives through an XHR response.
attachPreEffect:function( triggerId, animationFunc, async )
Schedules the execution of an effect when the specified link is clicked (and thus an XHR request begins).
tapestry.fx.attachPostEffect <dojo.lfx.IAnimation>
triggerId | The clientId of the DirectLink that triggers the effect. |
animationFunc | A function that returns the animation to execute. |
async | Boolean 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. |
Here’s an example usage: tapestry.fx.attachPreEffect(“DirectLink”, function(){return dojo.lfx.wipeOut(“entry”, 800, dojo.lfx.easeDefault) });
attachPostEffect:function( updateId, animationFunc )
Schedules the execution of an effect when the specified content is returned through an XHR response.
tapestry.fx.attachPreEffect <dojo.lfx.IAnimation>
updateId | The id of a dom node that (when updated) triggers the effect. |
animationFunc | A function that returns the animation to execute. |
Here’s an example usage: tapestry.fx.attachPostEffect(“entry”, function(){return dojo.lfx.wipeIn(“entry”, 1500, dojo.lfx.easeDefault) });
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.
a1 | The dom id to show - hide, or the function to invoke when ajax starts or ends. |
Schedules the execution of an effect when the specified link is clicked (and thus an XHR request begins).
attachPreEffect:function( triggerId, animationFunc, async )
Schedules the execution of an effect when the specified content is returned through an XHR response.
attachPostEffect:function( updateId, animationFunc )
Removes all registered effects (preEffects and postEffects).
removeAll:function()
Allows specifying a dom node that will be shown or hidden while ajax requests are in progress or have finished.
attachAjaxStatus:function( a1 )