3 Replies Latest reply on Dec 5, 2011 6:59 AM by healeyb

    Equivalent of org.richfaces.LoadScriptStrategy in RF 4.1 CR1

    klhoste2

      Hello,

       

      I'm migrating an application from RichFaces 3.3.3 to 4.1 (CR1) and I'm wondering what are the equivalent of the following parameters used in web.xml for resource loading strategy :

       

      <!-- Load all Richfaces JS in one file -->
      <context-param>
          <param-name>org.richfaces.LoadScriptStrategy</param-name>
          <param-value>ALL</param-value>
      </context-param>
      <!--  Load all Richfaces CSS in one file -->
      <context-param>
          <param-name>org.richfaces.LoadStyleStrategy</param-name>
          <param-value>ALL</param-value>
      </context-param>

       

      I've read this documentation but it's not clear and I don't know what parameters I have to set.

       

      What I want is to have only one request (or two) for loading JavaScripts and CSS.

       

      Thanks by advance.

        • 1. Re: Equivalent of org.richfaces.LoadScriptStrategy in RF 4.1 CR1
          healeyb

          I tried this in web.xml:

           

          <context-param>

                  <param-name>org.richfaces.resourceMapping.enabled</param-name>

                  <param-value>true</param-value>

              </context-param>

              <context-param>

                  <param-name>org.richfaces.resourceMapping.compressedPhases</param-name>

                  <param-value>All</param-value>

              </context-param>

              <context-param>

                  <param-name>org.richfaces.resourceMapping.packedPhases</param-name>

                  <param-value>All</param-value>

          </context-param>

           

          but I couldn't get it to work:

           

          http://community.jboss.org/message/638690

          • 2. Re: Equivalent of org.richfaces.LoadScriptStrategy in RF 4.1 CR1
            klhoste2

            Hello Brendan,

             

            It seems that you are wrong, it's not "Phases" but "Stages", your configuration should be:

             

            <context-param>

                    <param-name>org.richfaces.resourceMapping.enabled</param-name>

                    <param-value>true</param-value>

                </context-param>

                <context-param>

                    <param-name>org.richfaces.resourceMapping.compressedStages</param-name>

                    <param-value>All</param-value>

                </context-param>

                <context-param>

                    <param-name>org.richfaces.resourceMapping.packedStages</param-name>

                    <param-value>All</param-value>

            </context-param>

             

            Did you tried with this ?

            • 3. Re: Equivalent of org.richfaces.LoadScriptStrategy in RF 4.1 CR1
              healeyb

              Hi, I just tried with Stages instead of Phases, but I'm still getting the same results... Thanks for the

              suggestion though.