2 Replies Latest reply on Oct 23, 2012 1:37 AM by jmsjr

    Skinning not working ?

    jmsjr Newbie

      To start of, I am only starting to use JSF and RichFaces.

       

      A) Does skinning and theming apply to JSF tags ... or only to RichFaces tags ?

      B) I am trying out the rich:panel as below, but I am not seeing the skinning like that shown in http://livedemo.exadel.com/richfaces-demo/richfaces/panel.jsf?c=panel&tab=usage

       

      To start off:

       

      1) I am running JBoss 7.1

       

      2) My web.xml has the skin defined to deepMarine ( one of the pre-defined skins ):

       

      <?xml version="1.0"?>

      <web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"

      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">

      <display-name>insurance</display-name>

      <context-param>

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

        <param-value>deepMarine</param-value>

      </context-param>

      <servlet>

        <servlet-name>Faces Servlet</servlet-name>

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

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

      </servlet>

      <servlet-mapping>

        <servlet-name>Faces Servlet</servlet-name>

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

      </servlet-mapping>

      <servlet-mapping>

        <servlet-name>Faces Servlet</servlet-name>

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

      </servlet-mapping>

      <servlet-mapping>

        <servlet-name>Faces Servlet</servlet-name>

        <url-pattern>/faces/*</url-pattern>

      </servlet-mapping>

      </web-app>

       

       

      3) The contents of my WAR file:

       

      $ unzip -l test.war

      Archive:  test.war

        Length      Date    Time    Name

      ---------  ---------- -----   ----

             39  10-18-2012 14:53   META-INF/MANIFEST.MF

              0  10-18-2012 14:53   META-INF/

              0  10-22-2012 13:30   WEB-INF/

             78  10-22-2012 13:30   WEB-INF/.faces-config.xml.jsfdia

            519  10-23-2012 10:40   WEB-INF/faces-config.xml

              0  10-19-2012 15:20   WEB-INF/lib/

          48742  10-18-2012 14:53   WEB-INF/lib/common-annotations.jar

         188671  10-18-2012 14:53   WEB-INF/lib/commons-beanutils.jar

         559366  10-18-2012 14:53   WEB-INF/lib/commons-collections.jar

         139966  10-18-2012 14:53   WEB-INF/lib/commons-digester.jar

          38015  10-18-2012 14:53   WEB-INF/lib/commons-logging.jar

         173687  10-18-2012 15:05   WEB-INF/lib/cssparser-0.9.5-sources.jar

         253950  10-18-2012 15:05   WEB-INF/lib/cssparser-0.9.5.jar

         840203  10-18-2012 15:08   WEB-INF/lib/guava-10.0.1-sources.jar

        1501575  10-18-2012 15:08   WEB-INF/lib/guava-10.0.1.jar

          21029  10-18-2012 14:53   WEB-INF/lib/jstl.jar

          80094  05-13-2012 23:01   WEB-INF/lib/richfaces-components-api-4.2.2.Final-sources.jar

          70358  05-13-2012 23:01   WEB-INF/lib/richfaces-components-api-4.2.2.Final.jar

         973549  05-13-2012 23:01   WEB-INF/lib/richfaces-components-ui-4.2.2.Final-sources.jar

        6417675  05-13-2012 23:01   WEB-INF/lib/richfaces-components-ui-4.2.2.Final.jar

         164637  05-13-2012 23:01   WEB-INF/lib/richfaces-core-api-4.2.2.Final-sources.jar

         145915  05-13-2012 23:01   WEB-INF/lib/richfaces-core-api-4.2.2.Final.jar

         355218  05-13-2012 23:01   WEB-INF/lib/richfaces-core-impl-4.2.2.Final-sources.jar

         464753  05-13-2012 23:01   WEB-INF/lib/richfaces-core-impl-4.2.2.Final.jar

          33134  10-18-2012 15:04   WEB-INF/lib/sac-1.3-sources.jar

          15808  10-18-2012 15:04   WEB-INF/lib/sac-1.3.jar

         370454  10-11-2012 19:15   WEB-INF/lib/ssoJBase.jar

         393259  10-18-2012 14:53   WEB-INF/lib/standard.jar

          41630  10-23-2012 14:23   WEB-INF/lib/workflow.jar

           1080  10-23-2012 15:06   WEB-INF/web.xml

            632  10-23-2012 15:11   testSkin.xhtml

      ---------                     -------

       

       

      4) I have the following testSkin.xhtml

       

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

      <html xmlns="http://www.w3.org/1999/xhtml"

            xmlns:h="http://java.sun.com/jsf/html"

            xmlns:f="http://java.sun.com/jsf/core"

            xmlns:ui="http://java.sun.com/jsf/facelets"

            xmlns:a4j="http://richfaces.org/a4j"

            xmlns:rich="http://richfaces.org/rich">     

           

             <rich:panel>

             <f:facet name="header">

                 <h:outputText value="Example Panel Header"/>

             </f:facet>

                 <h:outputText value="Example Test in Panel"/>

             </rich:panel>

      </html>

       

      5) When I open the testSkin.jsf via my browser, all I get is the bland, non-skinned HTML output:

       

      testSkin.PNG

      6) The HTML output is as follows:

       

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

      <html xmlns="http://www.w3.org/1999/xhtml"><div class="rf-p " id="j_idt3"><div class="rf-p-hdr " id="j_idt3_header">Example Panel Header</div><div class="rf-p-b " id="j_idt3_body">Example Test in Panel</div></div>

      </html>

       

      I must have missed a very simple instruction, but I could not figure it out .. Been banging my head for several hours now.

      Did I miss putting something in my WAR file ??

      Do I have to copy the deepMarine.skin.properties from richfaces-core-impl-4.2.2.jar into META-INF/skins of my own WAR archive ?

       

       

      Thanks.