You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Arthur (JIRA)" <ji...@apache.org> on 2014/03/07 23:09:44 UTC

[jira] [Commented] (WICKET-4959) Notify behaviors when a component is removed from the tree

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

Arthur commented on WICKET-4959:
--------------------------------

Hi, 

I have exactly the same problem with Wicket 1.5.x, Unfortunately we are stuck to this version for now. Do you have any recommended fix to stop the JavaScript Keep polling on client side when the Behavior has been removed from the component on server of if it has been replaced in the meantime? Appreciate any help!

Regards, 
Arthur

> Notify behaviors when a component is removed from the tree
> ----------------------------------------------------------
>
>                 Key: WICKET-4959
>                 URL: https://issues.apache.org/jira/browse/WICKET-4959
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-extensions
>    Affects Versions: 6.4.0
>            Reporter: Paul
>            Assignee: Martin Grigorov
>            Priority: Minor
>             Fix For: 6.5.0
>
>         Attachments: WICKET-4959.patch, quickstart.zip
>
>
> I use a AjaxTabbedPanel on my page and run into the following problem:
> If there is an Behavior (AjaxSelfUpdatingTimer or AbstractAjaxTimerBehavior) attached to one of the panels and the panel is replaced by another panel, the AjaxBehavior is not properly removed and deactivated. After the idle-duration the JS calls in and Wicket throws an exception due to the missing behavior.
> Stacktrace:
> ERROR - DefaultExceptionMapper     - Unexpected error occurred
> org.apache.wicket.behavior.InvalidBehaviorIdException: Cannot find behavior with id '0' on component 'org.apache.wicket.markup.html.panel.EmptyPanel:tabs:panel' in page '[Page class = com.wicket.HomePage, id = 0, render count = 4]'. Perhaps the behavior did not properly implement getStatelessHint() and returned 'true' to indicate that it is stateless instead of returning 'false' to indicate that it is stateful.
> 	at org.apache.wicket.Behaviors.getBehaviorById(Behaviors.java:303)
> 	at org.apache.wicket.Component.getBehaviorById(Component.java:4483)
> 	at org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.invokeListener(ListenerInterfaceRequestHandler.java:246)
> 	at org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:226)
> ...
> I attached a quickstart showing the problem. Simply take a look at second tab and then go back to the first tab and you run into this problem. 
> There is a workaround for this: If you attach the behavior to a component of the panel (i.e. the clock) this error doesn't occur.



--
This message was sent by Atlassian JIRA
(v6.2#6252)