2 Replies Latest reply on Sep 4, 2007 8:33 AM by chawax

    Can't make skins work with Richfaces

    chawax

      Hi,

      I wrote pages including Richfaces components (toolbar and dropdownmenu), but th skin I set in my web.xm file doesn't apply in the browser. When I had a look on what happened with Firebug, I saw that it failed to get those three URLs :
      - http://localhost:8080/t4Seam/a4j.res/css/toolBar.xcss/DATA/eAGz-yBjAQAEPAGD.seam
      - http://localhost:8080/t4Seam/a4j.res/css/dropdownmenu.xcss/DATA/eAGz-yBjAQAEPAGD.seam
      - http://localhost:8080/t4Seam/a4j.res/css/menucomponents.xcss/DATA/eAGz-yBjAQAEPAGD.seam

      I saw also that it could find Javascript files further, but the URL doesn't finish with "/DATA/eAGz-yBjAQAEPAGD.seam".

      Where does this "/DATA/eAGz-yBjAQAEPAGD.seam" come from ? Is it related with skins ? If it has nothing to see with my problem, where could it come from ?

      My application is built with Seam 1.1, Richfaces 3.0.1, Trinidad 1.0.1 and runs on JBoss 4.0.5 GA. Here is my web.xml :

      <?xml version="1.0" encoding="UTF-8"?>
      
      <web-app version="2.5"
       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_2_5.xsd">
      
       <!-- ************************ Seam Listener **************************** -->
       <listener>
       <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
       </listener>
      
       <!-- ************************ Ajax4jsf Filter **************************** -->
       <filter>
       <display-name>Ajax4jsf Filter</display-name>
       <filter-name>ajax4jsf</filter-name>
       <filter-class>org.ajax4jsf.FastFilter</filter-class>
       <init-param>
       <param-name>enable-cache</param-name>
       <param-value>true</param-value>
       </init-param>
       <init-param>
       <param-name>forceparser</param-name>
       <param-value>true</param-value>
       </init-param>
       </filter>
      
       <filter-mapping>
       <filter-name>ajax4jsf</filter-name>
       <servlet-name>Faces Servlet</servlet-name>
       <dispatcher>REQUEST</dispatcher>
       <dispatcher>FORWARD</dispatcher>
       <dispatcher>INCLUDE</dispatcher>
       </filter-mapping>
      
       <!-- ************************ Trinidad Filter **************************** -->
       <filter>
       <display-name>Trinidad Filter</display-name>
       <filter-name>trinidad</filter-name>
       <filter-class>org.apache.myfaces.trinidad.webapp.TrinidadFilter</filter-class>
       </filter>
      
       <filter-mapping>
       <filter-name>trinidad</filter-name>
       <servlet-name>Faces Servlet</servlet-name>
       <dispatcher>REQUEST</dispatcher>
       <dispatcher>FORWARD</dispatcher>
       <dispatcher>INCLUDE</dispatcher>
       </filter-mapping>
      
       <!-- ************************ Seam Filter **************************** -->
       <filter>
       <filter-name>Seam Filter</filter-name>
       <filter-class>org.jboss.seam.web.SeamFilter</filter-class>
       </filter>
      
       <filter-mapping>
       <filter-name>Seam Filter</filter-name>
       <servlet-name>Faces Servlet</servlet-name>
       </filter-mapping>
      
       <!-- ************************ Manual Filters **************************** -->
      
      
      
       <!-- ************************ SEAM Config **************************** -->
       <!-- 300 second conversation timeout -->
       <context-param>
       <param-name>org.jboss.seam.core.manager.conversationTimeout</param-name>
       <param-value>300000</param-value>
       </context-param>
       <context-param>
       <param-name>org.jboss.seam.core.init.debug</param-name>
       <param-value>true</param-value>
       </context-param>
      
       <!-- ********************* Facelets Config ************************** -->
       <context-param>
       <param-name>facelets.VIEW_MAPPINGS</param-name>
       <param-value>*.xhtml</param-value>
       </context-param>
       <context-param>
       <description>Prevents HTML-Comments from beeing rendered</description>
       <param-name>facelets.SKIP_COMMENTS</param-name>
       <param-value>true</param-value>
       </context-param>
      
       <!-- ************************ JSF Config **************************** -->
       <context-param>
       <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
       <param-value>.xhtml</param-value>
       </context-param>
       <context-param>
       <description>
       State saving method: "client" or "server" (= default)
       See JSF Specification 2.5.2. In ADF Faces, it is an
       optimized, token-based mechanism that is almost always a
       better choice than the standard JSF server-side state saving.
       </description>
       <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
       <param-value>client</param-value>
       </context-param>
      
       <!-- ************************ MyFaces Config **************************** -->
       <context-param>
       <description>
       This parameter tells MyFaces if javascript code should be allowed in the
       rendered HTML output.
       If javascript is allowed, command_link anchors will have javascript code
       that submits the corresponding form.
       If javascript is not allowed, the state saving info and nested parameters
       will be added as url parameters.
       Default: "true"
       </description>
       <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
       <param-value>true</param-value>
       </context-param>
       <context-param>
       <description>
       If true, rendered HTML code will be formatted, so that it is "human readable".
       i.e. additional line separators and whitespace will be written, that do not
       influence the HTML code.
       Default: "true"
       </description>
       <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
       <param-value>true</param-value>
       </context-param>
       <context-param>
       <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
       <param-value>false</param-value>
       </context-param>
       <context-param>
       <description>
       If true, a javascript function will be rendered that is able to restore the
       former vertical scroll on every request. Convenient feature if you have pages
       with long lists and you do not want the browser page to always jump to the top
       if you trigger a link or button action that stays on the same page.
       Default: "false"
       </description>
       <param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
       <param-value>true</param-value>
       </context-param>
       <context-param>
       <param-name>com.sun.faces.validateXml</param-name>
       <param-value>true</param-value>
       </context-param>
       <context-param>
       <param-name>com.sun.faces.verifyObjects</param-name>
       <param-value>true</param-value>
       </context-param>
      
       <!-- ************************ Trinidad Config **************************** -->
       <context-param>
       <param-name>org.apache.myfaces.trinidad.DEBUG_JAVASCRIPT</param-name>
       <param-value>false</param-value>
       </context-param>
       <context-param>
       <!--
       If this parameter is enabled, Trinidad will automatically
       check the modification date of your JSPs, and discard saved
       state when they change; this makes development easier,
       but adds overhead that should be avoided when your application
       is deployed
       -->
       <param-name>org.apache.myfaces.trinidad.CHECK_FILE_MODIFICATION</param-name>
       <param-value>true</param-value>
       </context-param>
       <context-param>
       <param-name>org.apache.myfaces.trinidad.resource.DEBUG</param-name>
       <param-value>true</param-value>
       </context-param>
       <context-param>
       <param-name>org.apache.myfaces.trinidad.ALTERNATE_VIEW_HANDLER</param-name>
       <param-value>org.jboss.seam.ui.facelet.SeamFaceletViewHandler</param-value>
       <!--param-value>com.sun.facelets.FaceletViewHandler</param-value-->
       </context-param>
       <context-param>
       <param-name>org.apache.myfaces.trinidad.CACHE_VIEW_ROOT</param-name>
       <param-value>false</param-value>
       </context-param>
       <context-param>
       <param-name>org.apache.myfaces.trinidadinternal.DISABLE_CONTENT_COMPRESSION</param-name>
       <param-value>true</param-value>
       </context-param>
      
       <!-- ************************ Ajax4JSF Config **************************** -->
       <context-param>
       <param-name>org.ajax4jsf.SKIN</param-name>
       <param-value>DEFAULT</param-value>
       </context-param>
      
       <!-- ************************ Manual Merged Config **************************** -->
       <!-- uncomment if you want to add your own project specific facelet tags
       (and of course make sure "/WEB-INF/custom.taglib.xml" is the actual path
       to your facelet tag descriptor)
       <context-param>
       <param-name>facelets.LIBRARIES</param-name>
       <param-value>
       /WEB-INF/custom.taglib.xml;
       </param-value>
       </context-param>
       -->
      
       <!-- ************************ MyFaces Listener **************************** -->
       <listener>
       <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
       </listener>
      
       <!-- ************************ Seam Servlet Mapping ************************ -->
       <servlet>
       <servlet-name>Seam Resource Servlet</servlet-name>
       <servlet-class>org.jboss.seam.servlet.ResourceServlet</servlet-class>
       </servlet>
      
       <servlet-mapping>
       <servlet-name>Seam Resource Servlet</servlet-name>
       <url-pattern>/seam/resource/*</url-pattern>
       </servlet-mapping>
      
       <!-- ************************ Faces Servlet Mapping **************************** -->
       <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>*.seam</url-pattern>
       </servlet-mapping>
      
       <!-- ************************ Trinidad Resources Servlet **************************** -->
       <servlet>
       <servlet-name>Trinidad Resources</servlet-name>
       <servlet-class>org.apache.myfaces.trinidad.webapp.ResourceServlet</servlet-class>
       </servlet>
      
       <servlet-mapping>
       <servlet-name>Trinidad Resources</servlet-name>
       <url-pattern>/adf/*</url-pattern>
       </servlet-mapping>
      
       <!-- precompilation merge-point -->
      
      
       <session-config>
       <session-timeout>45</session-timeout>
       <!-- session-config merge-point -->
       </session-config>
      
      
       <!-- Welcome files -->
       <welcome-file-list>
      
       <welcome-file>index.jsp</welcome-file>
       <welcome-file>index.html</welcome-file>
       </welcome-file-list>
      
       <error-page>
       <error-code>408</error-code>
       <location>/index.jsp</location>
       </error-page>
       <error-page>
       <error-code>403</error-code>
       <location>/403.jsp</location>
       </error-page>
      
       <!-- taglib merge-point -->
       <!-- resource-ref merge-point -->
      
      
       <security-constraint>
       <web-resource-collection>
       <web-resource-name>Raw-JSF-Pages</web-resource-name>
       <description>
       Prevent access to raw pages that are for JSF pages.
       (No roles, so no direct access)
       </description>
       </web-resource-collection>
       <auth-constraint>
       </auth-constraint>
       <user-data-constraint>
       <transport-guarantee>NONE</transport-guarantee>
       </user-data-constraint>
       </security-constraint>
      </web-app>


      Thanks in advance for your help ;)