tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (TAP5-1866) ZoneRefresh mixin should perform cleanup if the zone is destroyed
Date Thu, 01 May 2014 11:01:20 GMT

    [ https://issues.apache.org/jira/browse/TAP5-1866?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13986495#comment-13986495

ASF subversion and git services commented on TAP5-1866:

Commit b97d9aa36a7c4826a329ebad7ca44a4067a48de9 in tapestry-5's branch refs/heads/master from
[ https://git-wip-us.apache.org/repos/asf?p=tapestry-5.git;h=b97d9aa ]

TAP5-1866: stop the ZoneRefresh timer if a Zone if removed from the DOM

> ZoneRefresh mixin should perform cleanup if the zone is destroyed
> -----------------------------------------------------------------
>                 Key: TAP5-1866
>                 URL: https://issues.apache.org/jira/browse/TAP5-1866
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-core
>    Affects Versions: 5.3.2, 5.4
>            Reporter: Dragan Sahpaski
>            Assignee: Jochen Kemnade
>            Priority: Minor
>              Labels: patch, zonerefresh
>         Attachments: TAP5-1866.patch
> Consider the following use case:
> A zone with a ZoneRefresh (located in another zone) is updated several times and then
the outer zone is updated with another block.
> Currently, after the update, exceptions are constantly thrown by the javascript PeriodicUpdater
in zone-refresh.js on the line "zoneRefresh.fire(Tapestry.ZONE_REFRESH_EVENT)" because the
div element that's linked to the zone with Tapestry.Initializer.updateZoneOnEvent is not destroyed
and the corresponding timer is also not destroyed.
> The ZoneRefresh mixin should cleanup after itself in scenarios like this.
> A patch with tests is provided.
> Summary:
> 1. [MODIFIED] 	zone-refresh.js - On a timer update if the zone does not exist remove
the "div" element on which the updates are triggered and stop the timer.
> 2. [MODIFIED] 	ZoneRefreshTest.java - One test method added
> 3. [ADDED] 	ZoneRefreshDestroyingZones.tml - Demo page with one outer zone with a ZoneRefresh
mixin that toggles between two inner zones each a with ZoneRefresh mixin.
> 4. [ADDED] 	ZoneRefreshDestroyingZones.java
> 5. [MODIFIED] 	Index.tml - Link to ZoneRefreshDestroyingZones added
> The patch does not modify any public API.
> This patch is also blocked by TAP5-1867 "SeleniumTestCase.waitForElementToDisappear(String
elementId) does not seem to work",
> because the patch uses SeleniumTestCase.waitForElementToDisappear(String elementId).

This message was sent by Atlassian JIRA

View raw message