You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Michael Gerzabek (JIRA)" <de...@tapestry.apache.org> on 2008/06/30 19:49:45 UTC
[jira] Created: (TAPESTRY-2493) Javascript rendering at the end of
pages is unacceptable
Javascript rendering at the end of pages is unacceptable
--------------------------------------------------------
Key: TAPESTRY-2493
URL: https://issues.apache.org/jira/browse/TAPESTRY-2493
Project: Tapestry
Issue Type: Bug
Components: JavaScript
Affects Versions: 5.0.13
Environment: WinXP, J1.5.14, Jetty
Reporter: Michael Gerzabek
With 5.0.13 all JavaScript libraries are now included at the end of the html page. This breaks many projects that use dynamic content rendering on the client!
One example can be found in [1] resp. [2]. The behaviour makes it now a PITA to write components that have their own javascript files. Please - is there a solution to this?
[1] http://www.nabble.com/Re%3A-T5-5.0.13-Javascript-rendering-at-end-of-document---questions-regd-to18110549.html#a18110549
[2] http://www.nabble.com/T5-5.0.13-Javascript-rendering-at-end-of-document---questions-regd-to18110439.html#a18110439
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org
[jira] Commented: (TAPESTRY-2493) Javascript rendering at the end
of pages is unacceptable
Posted by "Michael Gerzabek (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-2493?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12609332#action_12609332 ]
Michael Gerzabek commented on TAPESTRY-2493:
--------------------------------------------
Sorry for the tone!
I just wanted to deposit that prior to 5.0.13 everything around javascript and components worked out fine. Now there is an extra mile to take where the why is hard to understand.
Workaround that's approachable:
@Inject
@Path( "${tapestry.scriptaculous}/prototype.js" )
private Asset _prototypeJs;
boolean beginRender( MarkupWriter writer ) throws Exception {
Document d = writer.getDocument();
Element head = d.find("html/head");
head.element( "script", "src", _prototypeJs.toClientURL() );
But that somehow is ugly. Isn't it? At least if from 5.0.5 to 5.0.11 you didn't need to write anything about a scriptaculous file. My 2 cents.
> Javascript rendering at the end of pages is unacceptable
> --------------------------------------------------------
>
> Key: TAPESTRY-2493
> URL: https://issues.apache.org/jira/browse/TAPESTRY-2493
> Project: Tapestry
> Issue Type: Bug
> Components: JavaScript
> Affects Versions: 5.0.13
> Environment: WinXP, J1.5.14, Jetty
> Reporter: Michael Gerzabek
>
> With 5.0.13 all JavaScript libraries are now included at the end of the html page. This breaks many projects that use dynamic content rendering on the client!
> One example can be found in [1] resp. [2]. The behaviour makes it now a PITA to write components that have their own javascript files. Please - is there a solution to this?
> [1] http://www.nabble.com/Re%3A-T5-5.0.13-Javascript-rendering-at-end-of-document---questions-regd-to18110549.html#a18110549
> [2] http://www.nabble.com/T5-5.0.13-Javascript-rendering-at-end-of-document---questions-regd-to18110439.html#a18110439
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org
[jira] Resolved: (TAPESTRY-2493) Javascript rendering at the end of
pages is unacceptable
Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-2493?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Howard M. Lewis Ship resolved TAPESTRY-2493.
--------------------------------------------
Resolution: Invalid
Assignee: Howard M. Lewis Ship
There are extremely valid reasons why putting JavaScript at the bottom of the page, after all markup content, is a very good idea, both for compatibility across browsers, and for overall rendering performance.
See http://developer.yahoo.com/yslow/faq.html
The problem is that you are emitting inline <script> blocks when you should be using RenderSupport.addScript().
This is NOT going to change back.
> Javascript rendering at the end of pages is unacceptable
> --------------------------------------------------------
>
> Key: TAPESTRY-2493
> URL: https://issues.apache.org/jira/browse/TAPESTRY-2493
> Project: Tapestry
> Issue Type: Bug
> Components: JavaScript
> Affects Versions: 5.0.13
> Environment: WinXP, J1.5.14, Jetty
> Reporter: Michael Gerzabek
> Assignee: Howard M. Lewis Ship
>
> With 5.0.13 all JavaScript libraries are now included at the end of the html page. This breaks many projects that use dynamic content rendering on the client!
> One example can be found in [1] resp. [2]. The behaviour makes it now a PITA to write components that have their own javascript files. Please - is there a solution to this?
> [1] http://www.nabble.com/Re%3A-T5-5.0.13-Javascript-rendering-at-end-of-document---questions-regd-to18110549.html#a18110549
> [2] http://www.nabble.com/T5-5.0.13-Javascript-rendering-at-end-of-document---questions-regd-to18110439.html#a18110439
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org
[jira] Commented: (TAPESTRY-2493) Javascript rendering at the end
of pages is unacceptable
Posted by "Arnaud (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-2493?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12615089#action_12615089 ]
Arnaud commented on TAPESTRY-2493:
----------------------------------
Hi,
I agree with Michael, this change makes a lot of application buggy now and everything needs to be tested again.
I need to use the SWFObject javascript library in order to include some Flash content in the page and this library needs to be declared on top of the page.
I know there are some way to get my script working, but this is not really practical to have to recode everything.
If you don't want to change the default behavior, could you at least introduce an option to let the developer choose where the script should be generated.
Regards
Arnaud
> Javascript rendering at the end of pages is unacceptable
> --------------------------------------------------------
>
> Key: TAPESTRY-2493
> URL: https://issues.apache.org/jira/browse/TAPESTRY-2493
> Project: Tapestry
> Issue Type: Bug
> Components: JavaScript
> Affects Versions: 5.0.13
> Environment: WinXP, J1.5.14, Jetty
> Reporter: Michael Gerzabek
> Assignee: Howard M. Lewis Ship
>
> With 5.0.13 all JavaScript libraries are now included at the end of the html page. This breaks many projects that use dynamic content rendering on the client!
> One example can be found in [1] resp. [2]. The behaviour makes it now a PITA to write components that have their own javascript files. Please - is there a solution to this?
> [1] http://www.nabble.com/Re%3A-T5-5.0.13-Javascript-rendering-at-end-of-document---questions-regd-to18110549.html#a18110549
> [2] http://www.nabble.com/T5-5.0.13-Javascript-rendering-at-end-of-document---questions-regd-to18110439.html#a18110439
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org