[richfaces-issues] [JBoss JIRA] (RF-11822) Load components onload (on page ready)

Lukáš Fryč (Created) (JIRA) jira-events at lists.jboss.org
Fri Dec 16 10:13:09 EST 2011


Load components onload (on page ready)
--------------------------------------

                 Key: RF-11822
                 URL: https://issues.jboss.org/browse/RF-11822
             Project: RichFaces
          Issue Type: Feature Request
      Security Level: Public (Everyone can see)
          Components: cdk, core
    Affects Versions: 4.1.0.Final
            Reporter: Lukáš Fryč


According to Yahoo performance recommendations ([1], see "Post-load Components"),

visual components should be loaded on page load ({{onload}} event)
to avoid heavy JavaScript processing before page is completely visually built.

In RichFaces, it is simple task using {{JavaScriptService}}, which enables you to collect and inject JavaScript snippets which should be loaded using jQuery {{$(document).ready(...)}}.

Thanks to CDK templates, it's also simple change in renderers, just move component contructor to newly created CDK tag {{<cdk:onloadScript>}}, which would delegate to {{JavaScriptService}} (if {{JavaScriptService}} not found, processing may fall back to rendering {{<script>window.addEventHandler('load', ...)</script>}}, but this is optional part.

[1] http://developer.yahoo.com/performance/rules.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       



More information about the richfaces-issues mailing list