You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org> on 2014/04/16 16:58:16 UTC
[jira] [Closed] (TAP5-2236) It should be possible to determine when
there are active Ajax requests
[ https://issues.apache.org/jira/browse/TAP5-2236?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Howard M. Lewis Ship closed TAP5-2236.
--------------------------------------
Resolution: Fixed
Fix Version/s: 5.4
Assignee: Howard M. Lewis Ship
> It should be possible to determine when there are active Ajax requests
> ----------------------------------------------------------------------
>
> Key: TAP5-2236
> URL: https://issues.apache.org/jira/browse/TAP5-2236
> Project: Tapestry 5
> Issue Type: Bug
> Components: tapestry-core
> Affects Versions: 5.4
> Reporter: Howard M. Lewis Ship
> Assignee: Howard M. Lewis Ship
> Labels: testing
> Fix For: 5.4
>
>
> Often, for testing, it is necessary to know when an Ajax request has completed. This is currently accomplished via sleeps and such (in Tapestry's built-in test suite). For Ajax requests via the t5/core/dom:ajaxRequest API, Tapestry can track how many Ajax requests are active, and set an attribute on the body element to indicate if there are any active requests.
> The body attribute "data-ajax-active" will be "true" when there is at least one Ajax request and will revert to "false" when all requests have completed succesfully, or failed with an error or exception.
> This is similar to the "data-page-initialized" attribute; it is on the body element to make it easier to query it using CSS.
--
This message was sent by Atlassian JIRA
(v6.2#6252)