You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Grigorov (JIRA)" <ji...@apache.org> on 2012/07/11 09:11:34 UTC

[jira] [Commented] (WICKET-4652) AbstractAjaxTimerBehavior throws ComponentNotFoundException when its component is replaced in PageMap.

    [ https://issues.apache.org/jira/browse/WICKET-4652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13411288#comment-13411288 ] 

Martin Grigorov commented on WICKET-4652:
-----------------------------------------

I'm not sure either how this worked for you in 1.4...
In 6.0 the timer behavior has an additional logic to clear the timer (JS: clearTimeout()) when it is stopped. Your code doesn't stop it, so I think it it a problem in your code.

This is like not closing DB resources (connections, statements), Wicket cannot help you in cases like this.

If you debug what made it working in 1.4 and prove that there is a regression in 6.0 then I'll reopen the ticket. Otherwise I recommend you to stop the timer behavior when you replace the connected component (see org.apache.wicket.ajax.AbstractAjaxTimerBehavior#stop(AjaxRequestTarget)). 
                
> AbstractAjaxTimerBehavior throws ComponentNotFoundException when its component is replaced in PageMap.
> ------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-4652
>                 URL: https://issues.apache.org/jira/browse/WICKET-4652
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 6.0.0-beta2
>         Environment: Windows 7 with Jetty
>            Reporter: Steve Lowery
>            Priority: Minor
>         Attachments: TimerQuickStart.zip
>
>
> If a component with an AbstractAjaxTimerBehavior (or AjaxSelfUpdatingTimerBehavior) or any of its parents are replaced in the PageMap with another component, the next time behavior fires, you get a ComponentNotFoundException because the component with the attached behavior is no longer there.
> Not sure what js magic made this work in previous versions of wicket, but it wasn't an issue in 1.4.  Not sure about 1.5 as we are upgrading from 1.4 to 6.0.

--
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