3 Replies Latest reply on Mar 5, 2008 9:07 AM by mrmiagi

    Skins not working, generated css is XML?

    xbryan

      I am a RichFaces newbie, and I've followed the instructions on how to setup my webapp to use RichFaces. I am able to use the components, such as the dataTable, but there is no skin being applied to the resulting page. I looked at the source generated, and there is something like the following:



      This appears to be a link to the skin's CSS, but when I follow the link with my browser, it returns back XML, not CSS, starting with this...

      <template xmlns:f="http:/jsf.exadel.com/template" ....

      It contains a bunch of style data, and I imagine this is supposed to be transformed into CSS but it isn't.

      I'm using RichFaces 3.1.1 with JSF RI 1.1.01 in OC4J 10.1.3. Here's the relevant section of my web.xml:

      <!-- RichFaces setup -->

      <context-param>
      <param-name>org.richfaces.SKIN</param-name>
      <param-value>blueSky</param-value>
      </context-param>

      <display-name>RichFaces Filter</display-name>
      <filter-name>richfaces</filter-name>
      <filter-class>org.ajax4jsf.Filter</filter-class>

      <filter-mapping>
      <filter-name>richfaces</filter-name>
      <servlet-name>Faces Servlet</servlet-name>
      REQUEST
      FORWARD
      INCLUDE
      </filter-mapping>

      <!-- JSF setup -->


      <servlet-name>Faces Servlet</servlet-name>
      <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
      <load-on-startup>1</load-on-startup>

      <servlet-mapping>
      <servlet-name>Faces Servlet</servlet-name>
      <url-pattern>*.jsf</url-pattern>
      </servlet-mapping>

        • 1. Re: Skins not working, generated css is XML?
          xbryan

          Sorry the link element got stripped out in my post above. It looks like this:

          &lt;link rel='stylesheet' type='text/css' href='/sem/a4j_3_1_1-SNAPSHOTcss/table.xcss/DATB/eAFjlbr0AAAC6gHS.jsf' /&gt;

          • 2. Re: Skins not working, generated css is XML?
            xbryan

            I found the problem. There is a compatibility issue with RichFaces and OC4J. Specifically, the Oracle parser is set to be used by default for deployed applications, and this doesn't seem to work with RichFaces. In OC4J 10.1.3, you can remove the use of the Oracle parser by your application by modifying the orion-application.xml:

            <orion-application>
            <imported-shared-libraries>
            <remove-inherited name="oracle.xml"/>
            </imported-shared-libraries>
            </orion-application>

            Then your application should use the parser built into the JDK, and skins work!

            Hope that helps anyone who runs into this issue...

            • 3. Re: Skins not working, generated css is XML?
              mrmiagi

              I'm experiencing the same problem. I tried your solution and it works, but when the page is refreshed, e.g when a button is clicked, the skinning on the components disappear. Is there any other setting that need to be changed?