开发者

Richfaces 4.0.0.FINAL Skinning standard JSF tags and Html tags automatically cannot load

I've enabled skinning in my web.xml but nothing seems to take effect in my richfaces 4.0.0.FINAL why? My web.xml

<?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" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
     xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
     version="3.0">

<!-- Log4j configurated in spring!!!, 
before any code directly calling log4j (calling through commons logging doesn't count)? Jing Xue -->
    <context-param>
    <param-name>log4jConfigLocation</param-name>
    <param-value>/WEB-INF/log4j-webapp.properties</param-value>
    </context-param>
    <context-param>
    <param-name>log4jRefreshInterval</param-name>
    <param-value>1000</param-value>
    </context-param>

    <context-param>
    <param-name>webAppRootKey</param-name>
    <param-value>myWebapp-instance-root</param-value>
    </context-param>

    <listener>
    <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
    </listener>


<display-name>richfaces-application</display-name>
<!-- Listener para crear el Spring Container compartido por todos los 
Servlets y Filters (WebApplication Context)-->
<context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>
    classpath*:META-INF/spring/spring-master.xml
    WEB-INF/spring/spring-security.xml
    </param-value>
</context-param>

    <listener>
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>
<!-- For JSF -->
    <listener>
    <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
    </listener>
<!-- Jboss not use it bundle integrated JSF -->
    <context-param>
    <param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>
    <param-value>true</param-value>
    </context-param>

<!-- Facelets, tell JSF to use Facelets -->
    <context-param>
    <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
    <param-value>com.sun.facelets.FaceletViewHandler</param-value>
    </context-param>

<!-- Spring JavaServiceFaces framework ApacheMyfaces --> 
    <listener>
    <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
    </listener>

<!-- Spring Security, for all -->
    <filter>
    <filter-name>springSecurityFilterChain</filter-name>
    <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
    </filter>
    <filter-mapping>
    <filter-name>springSecurityFilterChain</filter-name>
    <url-pattern>/*</url-pattern>
    </filter-mapping>

<!-- RichFaces Framework -->
    <context-param>
    <param-name>org.richfaces.enableControlSkinning</param-name>
    <param-value>true</param-value>
    </context-param>
    <context-param>
    <param-name>org.richfaces.enableControlSkinningClasses</param-name>
    <param-value>false</param-value>
    </context-param>
    <context-param>
    <param-name>org.richfaces.SKIN</param-name>
    <param-value>blueSky</param-value>
    </context-param>

<!-- Servlets for JSF-->
    <servlet>
    <servlet-name>faces</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>faces</servlet-name>
    <url-pattern>*.xhtml</url-pattern>
    <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>

<!-- Servlet for Dispatcher of flows -->
<servlet>
    <servlet-name>transportes</servlet-name>
    <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
    <init-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>WEB-INF/spring/transportes-servlet.xml</param-value>
    </init-param>
     <load-on-startup>2</load-on-startup> 
</servlet>
<servlet-mapping>
    <servlet-name>transportes</servlet-name>
    <url-pattern>/flows/*</url-pattern>
</servlet-mapping>

<!-- Servlet register for SpringFaces, SpringJavaScript -->
    <servlet>
    <servlet-name>resources</servlet-name>
    <servlet-class>org.springframework.js.resource.ResourceServlet</servlet-class>
    <load-on-startup>0</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>resources</servlet-name>
    <url-pattern>/resources/*</url-pattern>
    </servlet-mapping>

<!-- Page That control SpringWeb -->
    <!--  
    <error-page>
       <error-code>404</error-code>
       <location>/WEB-INF/jsp/error.jsp</location>
    </error-page>
    -->
    <welcome-file-list>
    <welcome-file>/WEB-INF/flows/inscripcion/login.xhtml</welcome-file>
    </welcome-file-list>

</web-app>

and the page that i was to inject my blueSky theme. login.xhtml

  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition template="/WEB-INF/flows/template/default.xhtml"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:rich="http://richfaces.org/rich">

 <ui:define name="windowTitle">
    #{msgs.loginTitle}
 </ui:define>

 <ui:define name="heading">
    <ui:include src="/WEB-INF/flows/sections/login/header.xhtml"/>
 </ui:define>

 <ui:define name="sidebarLeft">
    <ui:include src="/WEB-INF/flows/sections/login/sidebarLeft.xhtml"/>
 </ui:define>

 <ui:define name="content">
    <h:form>
       <h:panelGrid columns="2">
      #{msgs.namePrompt}
      <h:inputText id="name" value="#{user.name}"/>
      #{msgs.passwordPrompt}
      <h:inputSecret id="password" value="#{user.password}"/>
       </h:panelGrid>
       &l开发者_Go百科t;p>
      <h:commandButton value="#{msgs.loginButtonText}"
                       action="planetarium"/>
       </p>
    </h:form>
 </ui:define>
</ui:composition>

this is my template.xhtml

   <html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html">
   <h:head>
      <title><ui:insert name="windowTitle"/></title>
   </h:head>

   <h:body>   
      <div id="heading" >
     <ui:insert name="heading">
        <ui:include src="/sections/inscripcion/header.xhtml"/>
     </ui:insert>
      </div>

      <div id="sidebarLeft"  style="float:left;height : 193px; width : 101px;">
     <ui:insert name="sidebarLeft">
        <ui:include src="/sections/inscripcion/sidebarLeft.xhtml"/>
     </ui:insert>
      </div>    

      <div id="content"  style="float:right;height : 193px; width : 689px;">
     <ui:insert name="content"/>
      </div>
      <!--  <ui:debug/>-->
   </h:body>
</html>

Why not load the blueSky skin?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜