You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Bertrand Guay-Paquet (JIRA)" <ji...@apache.org> on 2012/08/01 18:14:02 UTC
[jira] [Created] (WICKET-4689) Javascript timers not removed when a
Component is replaced by ajax
Bertrand Guay-Paquet created WICKET-4689:
--------------------------------------------
Summary: Javascript timers not removed when a Component is replaced by ajax
Key: WICKET-4689
URL: https://issues.apache.org/jira/browse/WICKET-4689
Project: Wicket
Issue Type: Bug
Components: wicket
Affects Versions: 6.0.0-beta3
Reporter: Bertrand Guay-Paquet
Attachments: quickstart.zip
The timer's javascript precondition checks that the component (html element) on which is
attached the timer behavior is still in the DOM document. When a component with a timer behavior is replaced in java in an ajax request by another component without this behavior, this check is not enough. In this case, the component id is still in the DOM (it was replaced by another one by the same id).
See email thread at:
http://apache-wicket.1842946.n4.nabble.com/ComponentNotFoundException-when-replace-a-fragment-with-ajax-tp4650898.html
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Assigned] (WICKET-4689) Javascript timers not removed when
a Component is replaced by ajax
Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-4689?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Grigorov reassigned WICKET-4689:
---------------------------------------
Assignee: Martin Grigorov
> Javascript timers not removed when a Component is replaced by ajax
> ------------------------------------------------------------------
>
> Key: WICKET-4689
> URL: https://issues.apache.org/jira/browse/WICKET-4689
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 6.0.0-beta3
> Reporter: Bertrand Guay-Paquet
> Assignee: Martin Grigorov
> Labels: ajax, timer
> Attachments: quickstart.zip
>
>
> The timer's javascript precondition checks that the component (html element) on which is
> attached the timer behavior is still in the DOM document. When a component with a timer behavior is replaced in java in an ajax request by another component without this behavior, this check is not enough. In this case, the component id is still in the DOM (it was replaced by another one by the same id).
> See email thread at:
> http://apache-wicket.1842946.n4.nabble.com/ComponentNotFoundException-when-replace-a-fragment-with-ajax-tp4650898.html
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (WICKET-4689) Javascript timers not removed when
a Component is replaced by ajax
Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-4689?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Grigorov resolved WICKET-4689.
-------------------------------------
Resolution: Fixed
Fix Version/s: 6.0.0
> Javascript timers not removed when a Component is replaced by ajax
> ------------------------------------------------------------------
>
> Key: WICKET-4689
> URL: https://issues.apache.org/jira/browse/WICKET-4689
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 6.0.0-beta3
> Reporter: Bertrand Guay-Paquet
> Assignee: Martin Grigorov
> Labels: ajax, timer
> Fix For: 6.0.0
>
> Attachments: quickstart.zip
>
>
> The timer's javascript precondition checks that the component (html element) on which is
> attached the timer behavior is still in the DOM document. When a component with a timer behavior is replaced in java in an ajax request by another component without this behavior, this check is not enough. In this case, the component id is still in the DOM (it was replaced by another one by the same id).
> See email thread at:
> http://apache-wicket.1842946.n4.nabble.com/ComponentNotFoundException-when-replace-a-fragment-with-ajax-tp4650898.html
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (WICKET-4689) Javascript timers not removed when
a Component is replaced by ajax
Posted by "Bertrand Guay-Paquet (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-4689?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13426727#comment-13426727 ]
Bertrand Guay-Paquet commented on WICKET-4689:
----------------------------------------------
Possible solution on the client-side :
New code when ajax response is received :
replacedDOMElement = ...;
$replacedDOMElement = $(replacedDOMElement);
for each js timers:
$component = $(timer.component);
if( $replacedDOMElement.is($component) ||
$replacedDOMElement.find($component ).length ) {
cancelTimer(timer);
}
To which Martin Grigorov replied:
Yes [this would work]
Wicket sends a message on topic '/dom/node/removed' for each removed element.
Using its id we can stop the timer.
I don't know what these message topics are however so I can't comment much further! My only possibly relevant concern is that timers of all children of a replaced element should be stopped as well in case some markup ids match.
> Javascript timers not removed when a Component is replaced by ajax
> ------------------------------------------------------------------
>
> Key: WICKET-4689
> URL: https://issues.apache.org/jira/browse/WICKET-4689
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 6.0.0-beta3
> Reporter: Bertrand Guay-Paquet
> Labels: ajax, timer
> Attachments: quickstart.zip
>
>
> The timer's javascript precondition checks that the component (html element) on which is
> attached the timer behavior is still in the DOM document. When a component with a timer behavior is replaced in java in an ajax request by another component without this behavior, this check is not enough. In this case, the component id is still in the DOM (it was replaced by another one by the same id).
> See email thread at:
> http://apache-wicket.1842946.n4.nabble.com/ComponentNotFoundException-when-replace-a-fragment-with-ajax-tp4650898.html
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (WICKET-4689) Javascript timers not removed when a
Component is replaced by ajax
Posted by "Bertrand Guay-Paquet (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-4689?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bertrand Guay-Paquet updated WICKET-4689:
-----------------------------------------
Attachment: quickstart.zip
Quickstart. Click on link to replace the component with a timer attached.
> Javascript timers not removed when a Component is replaced by ajax
> ------------------------------------------------------------------
>
> Key: WICKET-4689
> URL: https://issues.apache.org/jira/browse/WICKET-4689
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 6.0.0-beta3
> Reporter: Bertrand Guay-Paquet
> Labels: ajax, timer
> Attachments: quickstart.zip
>
>
> The timer's javascript precondition checks that the component (html element) on which is
> attached the timer behavior is still in the DOM document. When a component with a timer behavior is replaced in java in an ajax request by another component without this behavior, this check is not enough. In this case, the component id is still in the DOM (it was replaced by another one by the same id).
> See email thread at:
> http://apache-wicket.1842946.n4.nabble.com/ComponentNotFoundException-when-replace-a-fragment-with-ajax-tp4650898.html
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Closed] (WICKET-4689) Javascript timers not removed when a
Component is replaced by ajax
Posted by "Bertrand Guay-Paquet (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-4689?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bertrand Guay-Paquet closed WICKET-4689.
----------------------------------------
> Javascript timers not removed when a Component is replaced by ajax
> ------------------------------------------------------------------
>
> Key: WICKET-4689
> URL: https://issues.apache.org/jira/browse/WICKET-4689
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 6.0.0-beta3
> Reporter: Bertrand Guay-Paquet
> Assignee: Martin Grigorov
> Labels: ajax, timer
> Fix For: 6.0.0
>
> Attachments: quickstart.zip
>
>
> The timer's javascript precondition checks that the component (html element) on which is
> attached the timer behavior is still in the DOM document. When a component with a timer behavior is replaced in java in an ajax request by another component without this behavior, this check is not enough. In this case, the component id is still in the DOM (it was replaced by another one by the same id).
> See email thread at:
> http://apache-wicket.1842946.n4.nabble.com/ComponentNotFoundException-when-replace-a-fragment-with-ajax-tp4650898.html
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira