You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by "Paul Stanton (Created) (JIRA)" <ji...@apache.org> on 2012/03/11 23:32:40 UTC
[jira] [Created] (TAP5-1870) javascript added while in the render
phase of a component from an ajax request is never executed
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
Reporter: Paul Stanton
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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (TAP5-1870) javascript added while in the render
phase of a component from an ajax request is never executed
Posted by "Paul Stanton (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1870?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul Stanton updated TAP5-1870:
-------------------------------
Affects Version/s: 5.3.4
> 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
> Labels: ajax, javascript, zone
>
> 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
[jira] [Commented] (TAP5-1870) javascript added while in the render
phase of a component from an ajax request is never executed
Posted by "Paul Stanton (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1870?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13235499#comment-13235499 ]
Paul Stanton commented on TAP5-1870:
------------------------------------
I've found that the tidiest work around is to put the javascript snippet within the tml of the component:
<t:zone t:id="myZone" id="myZone">
<t:myComponent />
</t:zone>
myComponent.tml:
<div>
<p>Component content</p>
<script type="text/javascript">alert('here');</script>
</div>
This javascript is at least executed every time the component is (re)rendered.
Its an ugly solution but seems to work as a stop gap.
> 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
> Reporter: Paul Stanton
> Labels: ajax, javascript, zone
>
> 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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Issue Comment Edited] (TAP5-1870) javascript added while in
the render phase of a component from an ajax request is never executed
Posted by "Paul Stanton (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1870?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13227259#comment-13227259 ]
Paul Stanton edited comment on TAP5-1870 at 3/11/12 10:34 PM:
--------------------------------------------------------------
loosely related to TAP5-1861. could be solved in cooperation.
was (Author: paul.stanton):
loosely related. could be solved in cooperation.
> 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
> Reporter: Paul Stanton
> Labels: ajax, javascript, zone
>
> 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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (TAP5-1870) javascript added while in the render
phase of a component from an ajax request is never executed
Posted by "Paul Stanton (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1870?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13470984#comment-13470984 ]
Paul Stanton commented on TAP5-1870:
------------------------------------
this just caught me again.
> 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
> Labels: ajax, javascript, zone
>
> 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
[jira] [Updated] (TAP5-1870) javascript added while in the render
phase of a component from an ajax request is never executed
Posted by "Paul Stanton (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1870?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul Stanton updated TAP5-1870:
-------------------------------
Affects Version/s: 5.3.4
> 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
> Labels: ajax, javascript, zone
>
> 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
[jira] [Commented] (TAP5-1870) javascript added while in the render
phase of a component from an ajax request is never executed
Posted by "Paul Stanton (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1870?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13235499#comment-13235499 ]
Paul Stanton commented on TAP5-1870:
------------------------------------
I've found that the tidiest work around is to put the javascript snippet within the tml of the component:
<t:zone t:id="myZone" id="myZone">
<t:myComponent />
</t:zone>
myComponent.tml:
<div>
<p>Component content</p>
<script type="text/javascript">alert('here');</script>
</div>
This javascript is at least executed every time the component is (re)rendered.
Its an ugly solution but seems to work as a stop gap.
> 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
> Reporter: Paul Stanton
> Labels: ajax, javascript, zone
>
> 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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (TAP5-1870) javascript added while in the render
phase of a component from an ajax request is never executed
Posted by "Paul Stanton (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1870?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13470984#comment-13470984 ]
Paul Stanton commented on TAP5-1870:
------------------------------------
this just caught me again.
> 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
> Labels: ajax, javascript, zone
>
> 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
[jira] [Issue Comment Edited] (TAP5-1870) javascript added while in
the render phase of a component from an ajax request is never executed
Posted by "Paul Stanton (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1870?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13227259#comment-13227259 ]
Paul Stanton edited comment on TAP5-1870 at 3/11/12 10:34 PM:
--------------------------------------------------------------
loosely related to TAP5-1861. could be solved in cooperation.
was (Author: paul.stanton):
loosely related. could be solved in cooperation.
> 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
> Reporter: Paul Stanton
> Labels: ajax, javascript, zone
>
> 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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira