Richfaces styles not loading consistently
cc_humbry Sep 30, 2009 10:40 AMHi, I am asking this question here instead of the RichFaces forums as the configuration details found here http://docs.jboss.org/seam/2.1.1.GA/reference/en-US/html/configuration.html suggest that there is no need to add RichFaces specific configuration in web.xml.
If RichFaces is used in your project, Seam will install the RichFaces Ajax filter for you, making sure to install it before all other built-in filters. You don't need to install the RichFaces Ajax filter in web.xml yourself.
The RichFaces Ajax filter is only installed if the RichFaces jars are present in your project.
I have an issue where some of my RichFaces controls - toolbar, panel lose a lot of their styling. Header background, fonts etc.
When I look at the generated source code, I see that there are stylesheet links such as this
<link class='component' href='/behindbars/a4j/s/3_3_0.GAcss/panel.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__' rel='stylesheet' type='text/css'>"
Pasting the url into the browser just displays a blank page. Other links such as this
<link class="component" href="/behindbars/a4j/s/3_3_0.GAcss/tabPanel.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__" rel="stylesheet" type="text/css">
display appropriate styles. Unsurprisingly my TabPanel looks OK.
This is extremely frustrating. Can anyone suggest anything to fix this?? I have seen a couple of forums threads that appear to be similar, some suggesting it is to do with security of pages and others around adding various other bits to the web.xml, but as I have lifted my web.xml directly from the docs, I can't see that this is anything other than a bug.
I am using Seam 2.1.1GA and RichFaces 3.3.0.GA on GlassFish.
my web.xml looks like this
<?xml version="1.0" encoding="UTF-8"?> <web-app id="WebApp_ID" 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"> <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> <listener> <listener-class>org.jboss.seam.servlet.SeamListener</listener-class> </listener> <context-param> <param-name>javax.faces.DEFAULT_SUFFIX</param-name> <param-value>.xhtml</param-value> </context-param> <servlet> <servlet-name>Seam Resource Servlet</servlet-name> <servlet-class>org.jboss.seam.servlet.SeamResourceServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>Seam Resource Servlet</servlet-name> <url-pattern>/seam/resource/*</url-pattern> </servlet-mapping> <filter> <filter-name>Seam Filter</filter-name> <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class> </filter> <filter-mapping> <filter-name>Seam Filter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <context-param> <param-name>org.richfaces.SKIN</param-name> <param-value>blueSky</param-value> </context-param> </web-app>