[ https://issues.apache.org/jira/browse/WICKET-618?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12502204 ]
Ryan Sonnek commented on WICKET-618: ------------------------------------ One interesting thing to note is that the javascript rendered in the header contribution may need to be different than the javascript appended to an ajax request. for example, my components usually use onload scripts in the header to make sure they are executed after the DOM is loaded: Event.observe(window, 'load', function() { doStuff(); } When the ajax operation occurs, i don't think it's correct to re-attach this onload function (i could be wrong). I think the correct behavior would be just to stream down: doStuff(); This seems to be a pretty common usecase, and I'm not sure the best way for wicket to handle this... > auto add javascript in AjaxRequestTarget for behaviors that implement > IHeaderContributor > ----------------------------------------------------------------------------------------- > > Key: WICKET-618 > URL: https://issues.apache.org/jira/browse/WICKET-618 > Project: Wicket > Issue Type: Improvement > Components: wicket > Reporter: Ryan Sonnek > Assignee: Matej Knopp > > see: > http://www.nabble.com/adding-a-listener-to-the-AjaxRequestTarget-tf3065865.html#a8548871 > It's very common to have a component that renders javascript into the head, > and if it's refreshed with an ajax operation, the component no longer works > because the javascript wasn't re-attached. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.