You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org> on 2013/07/25 01:55:48 UTC
[jira] [Closed] (TAP5-1870) javascript added while in the render
phase of a component from an ajax request is never executed
[ https://issues.apache.org/jira/browse/TAP5-1870?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Howard M. Lewis Ship closed TAP5-1870.
--------------------------------------
Resolution: Fixed
Fix Version/s: 5.4
Assignee: Howard M. Lewis Ship
Part of the fix for TAP5-1984 was to reorder things like the AjaxResponseRenderer callbacks; those now occur dead last, after all rendering has completed. I believe that fixes the problem.
> javascript added while in the render phase of a component from an ajax request is never executed
> ------------------------------------------------------------------------------------------------
>
> Key: TAP5-1870
> URL: https://issues.apache.org/jira/browse/TAP5-1870
> Project: Tapestry 5
> Issue Type: Bug
> Components: tapestry-core
> Affects Versions: 5.3.2, 5.3.4
> Reporter: Paul Stanton
> Assignee: Howard M. Lewis Ship
> Labels: ajax, javascript, zone
> Fix For: 5.4
>
>
> When a zone update occurs, the 'setupRender' is called for each component contained by that zone.
> If a script is added to ajaxResponseRenderer within the 'setupRender' method it is never executed on the page.
> eg:
> public class MyPage
> {
> void onSomeEvent()
> {
> ajaxResponseRenderer.addRender(myZone); // myZone contains a MyComponent in the tml
> }
> }
> public class MyComponent
> {
> void setupRender()
> {
> if (request.isXHR())
> ajaxResponseRenderer.addCallback(new JavaScriptCallback() { public void run(JavaScriptSupport javascriptSupport) {
> javascriptSupport.addScript("alert('here');");}});
> }
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira