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

Matej Knopp commented on WICKET-1563:
-------------------------------------

First of all - I don't see why the renderHead method should be called by 
page#detach. That doesn't make whole lot sense to me.
Another thing is that the contribution is already filtered. If the javascript 
method has same body it will only be rendered once per request.

> renderOnLoadJavascript being called multiple times
> --------------------------------------------------
>
>                 Key: WICKET-1563
>                 URL: https://issues.apache.org/jira/browse/WICKET-1563
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.3
>            Reporter: Carlos Pita
>            Assignee: Matej Knopp
>
> There are at least of couple of common scenarios where this happens:
>  - you add the component that is a header contributor to an ajax target: 
> renderHead is called as part of target.respond() and latter by page.detach()
>  - you add the component that is a header contributor more than once to an 
> ajax target. Normally you can't control this, because the component in 
> question is added by another component indirectly, by adding some of its 
> ancestors. renderHead is called multiple times as part of target.respond() 
> and latter yet another time by page.detach()
> I think there must be a check to avoid repetitions of these nature, maybe by 
> means of an id, the same as renderJavascript() does.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to