0 Replies Latest reply on Aug 8, 2008 9:10 AM by hardik_982

    facelets

    hardik_982

      hi

      i am trying to use facelets with richfaces
      it works but css contains in template.xhtml could not work
      my template.xhtml

      <html
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:f="http://java.sun.com/jsf/core"
       xmlns:c="http://java.sun.com/jstl/core">
      
      
       <head>
       <link rel="stylesheet" type="text/css" href="Blue.css" media="screen"/>
       </head>
      
      
      
       <body>
      <div id="wrap">
       <div id="header">
       <ui:insert name="header">
       <ui:include src="header.xhtml"/>
       </ui:insert>
      
       </div>
       <div id="menu">
       <ui:insert name="menu">
       <ui:include src="menu.xhtml"/>
       </ui:insert>
      
       </div>
       <!-- content-wrap starts here -->
       <div id="content-wrap">
       <div id="sidebar">
       <ui:insert name="sidebar">
       <ui:include src="sidebar.xhtml"/>
       </ui:insert>
      
       </div>
       <div id="main">
       <ui:insert name="main">
       Main code will be here
       </ui:insert>
      
       </div>
       <!-- content-wrap ends here -->
       </div>
       <!--footer starts here-->
       <div id="footer">
       <ui:insert name="footer">
       <ui:include src="footer.xhtml"/>
       </ui:insert>
       </div>
       <!-- wrap ends here -->
       </div>
       </body>
      </html>
      
      



      my web.xml is

      <?xml version="1.0" encoding="UTF-8"?>
      <web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
       <display-name> richfacesdemo</display-name>
      
       <context-param>
       <param-name>org.richfaces.SKIN</param-name>
       <param-value>blueSky</param-value>
       </context-param>
       <context-param>
       <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
       <param-value>server</param-value>
       </context-param>
       <!-- Special Debug Output for Development -->
       <context-param>
       <param-name>facelets.DEVELOPMENT</param-name>
       <param-value>true</param-value>
       </context-param>
      
      
       <context-param>
       <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
       <param-value>com.sun.facelets.FaceletViewHandler</param-value>
       </context-param>
      
      
       <filter>
       <display-name>RichFaces Filter</display-name>
       <filter-name>richfaces</filter-name>
       <filter-class>org.ajax4jsf.Filter</filter-class>
       </filter>
       <filter-mapping>
       <filter-name>richfaces</filter-name>
       <servlet-name>Faces Servlet</servlet-name>
       <dispatcher>REQUEST</dispatcher>
       <dispatcher>FORWARD</dispatcher>
       <dispatcher>INCLUDE</dispatcher>
       </filter-mapping>
      
       <!-- Listener, to allow Jetty serving MyFaces apps -->
       <listener>
       <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
       </listener>
      
       <!-- faces servlet -->
       <servlet>
       <servlet-name>Faces Servlet</servlet-name>
       <servlet-class>
       javax.faces.webapp.FacesServlet</servlet-class>
       <load-on-startup>1</load-on-startup>
       </servlet>
      
       <!-- Faces Servlet Mapping -->
      
       <servlet-mapping>
       <servlet-name>Faces Servlet</servlet-name>
       <url-pattern>/*</url-pattern>
       </servlet-mapping>
      
      
      
      </web-app>
      


      template used by idex.xhtml

      <ui:composition xmlns="http://www.w3.org/1999/xhtml"
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:f="http://java.sun.com/jsf/core"
       xmlns:a4j="http://richfaces.org/a4j"
       xmlns:rich="http://richfaces.org/rich"
       template="/layout/template.xhtml">
      
      
       <ui:define name="main" >
       <f:view>
       <h:form>
       <rich:panel header="Simple Echo">
       <h:inputText size="50" value="#{bean.text}" >
       <a4j:support event="onkeyup" reRender="rep"/>
       </h:inputText>
       <h:outputText value="#{bean.text}" id="rep"/>
       </rich:panel>
       <rich:calendar datePattern="dd/MM/yyyy"></rich:calendar>
      
       </h:form>
       </f:view>
      
       </ui:define>
       </ui:composition>
      
      


      please help me for that