Skinning problems with RF-5 when using MyFaces
kababji May 16, 2014 6:07 AMIn eclipse I have created a simple dynamic web project, and added the following libraries to the WEB-INF/lib directory:
- richfaces-5.0.0.Alpha3.jar
- cssparser-0.9.11.jar
- guava-13.0.1.jar
- sac-1.3.jar
- myfaces 2.1.15 jars
The web.xml file is the following:
<?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0"> <display-name>test</display-name> <context-param> <param-name>org.richfaces.skin</param-name> <param-value>blueSky</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>*.xhtml</url-pattern> </servlet-mapping> </web-app>
My faces-config.xml file is:
<?xml version="1.0" encoding="UTF-8"?> <faces-config xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd" version="2.2"> </faces-config>
Now I wanted to test a very simple page that shows an extended data table as follows:
<!DOCTYPE html> <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:r="http://richfaces.org"> <h:head></h:head> <h:body> <r:extendedDataTable value="#{testBean.items}" var="r"> <r:column> <f:facet name="header"> <h:outputText value="username" /> </f:facet> <h:outputText value="#{r.column}" /> </r:column> </r:extendedDataTable> </h:body> </html>
The page gets displayed and the table is created correctly, but the only problem is that the SKIN is not applied, if I check the source of the generated HTML page I don't see the extendedDataTable.ecss import.
If I remove the MyFaces jars and replace them with the Mojarra implementation (javax.faces-2.2.1.jar) the skin is applied correctly! and now in the generated HTML page I see the extendedDataTable.ecss import.
I have tried with the different MyFaces versions (2.1.10 and 2.1.15, and 2.2.3) none of them applied the skins!
I am deploying to apache-tomcat-7.0.14 and using richfaces-5.0.0.Alpha3.jar
any thoughts?