0 Replies Latest reply on Jan 21, 2011 6:12 AM by Ganga k

    Resources (css/ skin / js) are not loaded with Richfaces 4 M5

    Ganga k Newbie

      Hi,

       

                  I have configured my project to use " Richfaces 4 M5 " with "JSF 2.0.3" & " Spring Web-Flow 2.2.1 release ".

       

      Here is the configuration in web.xml

       

      <!-- JSF configuration -->

          <servlet>

              <servlet-name>faces</servlet-name>

              <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>

              <load-on-startup>1</load-on-startup>

          </servlet>

          <servlet-mapping>

              <servlet-name>faces</servlet-name>

              <url-pattern>*.jsf</url-pattern>

              <url-pattern>*.xhtml</url-pattern>

          </servlet-mapping>

       

      <!-- Richfaces configuration -->

          <context-param>

              <param-name>javax.faces.application.CONFIG_FILES</param-name>

              <param-value>/WEB-INF/faces-config.xml</param-value>

          </context-param>

          <context-param>

              <param-name>javax.faces.STATE_SAVING_METHOD</param-name>

              <param-value>server</param-value>

          </context-param>

          <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>

          <context-param>

              <param-name>javax.portlet.faces.renderPolicy</param-name>

              <param-value>NEVER_DELEGATE</param-value>

          </context-param>

          <context-param>

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

              <param-value>blueSky</param-value>

          </context-param>

       

          <context-param>

              <param-name>org.ajax4jsf.RESOURCE_URI_PREFIX</param-name>

              <param-value>rfRes</param-value>

          </context-param>

       

          <context-param>

              <param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>

              <param-value>false</param-value>

          </context-param>

       

      And also download all required richfaces jars

       

      pom.xml

       

      <!-- RichFaces libraries -->

              <dependency>

                  <groupId>org.richfaces</groupId>

                  <artifactId>richfaces-bom</artifactId>

                  <version>${org.richfaces.bom.version}</version>

                  <scope>import</scope>

                  <type>pom</type>

              </dependency>

              <dependency>

                  <groupId>org.richfaces.ui</groupId>

                  <artifactId>richfaces-components-ui</artifactId>

                  <version>${org.richfaces.bom.version}</version>

              </dependency>

              <dependency>

                  <groupId>org.richfaces.core</groupId>

                  <artifactId>richfaces-core-impl</artifactId>

                  <version>${org.richfaces.bom.version}</version>

              </dependency>

       

      The style & Script are added in the xhtml

       

      <a4j:loadScript src="resource:///org/ajax4jsf/framework.pack.js" />

      <a4j:loadStyle src="resource:///org/richfaces/ui.pack.js" />

       

      <script type="text/javascript">window.RICH_FACES_EXTENDED_SKINNING_ON=true;</script>

       

       

      I don't get any errors or either warning in the Log.

       

      the View gets rendered without any styling in browser, just a plan Text is rendered in the UI.

       

      Still what configuration am i missing ?