1 Reply Latest reply on Apr 9, 2011 8:59 PM by boy18nj

    RichFaces4 LoadScriptStrategy NONE

    msznapka

      Hi

      It seems there is no alternative in RF4 for this RF3 web.xml configuration:

       

          <context-param>

              <param-name>org.richfaces.LoadStyleStrategy</param-name>

              <param-value>NONE</param-value>

          </context-param>

       

          <context-param>

              <param-name>org.richfaces.LoadScriptStrategy</param-name>

              <param-value>NONE</param-value>

          </context-param>

       

      Any idea how reach this in RF4? (even with some code changing and recompiling?)

       

       

       

       

      In our web application, we are joining / minifying / gzipping all JavaScripts into one file and including into the page with async param before the document end (like best practicies on Google or Yahoo says). Moreover we are adding caching headers and some version param for this JavaScript to avoid caching across deploys.

      I would like to achieve same situation in RF4, but blocking element for me is that RF4 does not support any configuration for disabling any JS or CSS.

      I know that that I have to manualy check JS dependencies for RF components, but since we are using only a4j components, it is not so big deal. Second problem is that I have to manualy add RF JavaScript to our minifier, but it is also no big deal, because I am doing that only within RF update.

      But still I think my solution is best for end user (one HTTP request, ...), so it would be fine if RF4 have some opportunity to disable @ResourceDependencies.

       

      Resources:

      http://community.jboss.org/wiki/RichFacesJavaScripthandling

      http://docs.jboss.org/richfaces/latest_4_0_X/javadoc/richfaces-core-impl/org/richfaces/application/CoreConfiguration.Items.html

      http://community.jboss.org/wiki/RichFacesMigrationGuide33x-4xMigration-Upgrading#app_descriptors