[ https://issues.apache.org/jira/browse/TAP5-1406?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Howard M. Lewis Ship closed TAP5-1406. -------------------------------------- Resolution: Not A Problem Assignee: Howard M. Lewis Ship This was correct at the time you reported it, but the new AjaxResponseRenderer service in 5.3 provides the facilities you desire, and invoking its methods will force a partial page render, even if your event handler method returns null. > xhr - javascriptSupport.addScript should work without any zone updates > ---------------------------------------------------------------------- > > Key: TAP5-1406 > URL: https://issues.apache.org/jira/browse/TAP5-1406 > Project: Tapestry 5 > Issue Type: Improvement > Components: tapestry-core > Affects Versions: 5.2 > Reporter: Paul Stanton > Assignee: Howard M. Lewis Ship > > If you have an xhr event handler which returns null, but does add a script to > the render, the script should still be executed. > currently I have to make sure that I perform at least one zone update when > returning a MultiZoneUpdate, ie if I were to return null the script would not > be executed on the client. > This forces me to rely on a dummy zone hack for cases when all i want to do > is call a script. > eg > private MultiZoneUpdate onSomething() > { > pageRenderQueue.addPartialMarkupRendererFilter(new > PartialMarkupRendererFilter() > { > public void renderMarkup(MarkupWriter writer, > JSONObject reply, PartialMarkupRenderer renderer) > { > javascriptSupport.addScript("alert('here');"); > renderer.renderMarkup(writer, reply); > } > }); > return null; > } > ^ the alert would not show > private MultiZoneUpdate onSomething() > { > pageRenderQueue.addPartialMarkupRendererFilter(new > PartialMarkupRendererFilter() > { > public void renderMarkup(MarkupWriter writer, > JSONObject reply, PartialMarkupRenderer renderer) > { > javascriptSupport.addScript("alert('here');"); > renderer.renderMarkup(writer, reply); > } > }); > return new MultiZoneUpdate("dummyZone", dummyZone); > } > ^ the alert would show provided dummyZone exists. -- 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