1 Reply Latest reply on Nov 7, 2011 1:51 PM by Mark Paluch

    Problem with rich:calendar - RichFaces is undefined

    Dexter N Newbie

      Im trying to configure richfaces 4 application on tomcat 7. The screen renders with input box and calendar icon, but screen loads with script error, richfaces is undefined. And also the the skin doesnt seem to apply, I tried running the calendar example from showcase for 4.0 and still calendar/skin doesnt seem to work. Have tried changing js loading strategy to ALL/default.

       

      Jars -  + Tomcat 7 runtime

      cssparser-0.9.5

      guava-r08

      guava-r08-gwt

      jsf-api (mojarra 2.1.2)

      jsf-impl

      jstl-api-1.2

      jst-impl-1.2

      richfaces-components-api-4.0.0.Final

      richfaces-components-ui-4.0.0.Final

      richfaces-core-api-4.0.0.Final

      richfaces-core-impl-4.0.0.Final

      sac.jar

       

       

      <?xml version="1.0" encoding="UTF-8"?>

      <web-app id="richfaces-showcase" 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">

                <display-name>richfaces-showcase</display-name>

                <context-param>

                          <param-name>org.richfaces.skin</param-name>

                          <param-value>#{skinBean.skin}</param-value>

                </context-param>

                <context-param>

                          <param-name>org.richfaces.fileUpload.maxRequestSize</param-name>

                          <param-value>100000</param-value>

                </context-param>

                <context-param>

                          <param-name>org.richfaces.fileUpload.createTempFiles</param-name>

                          <param-value>false</param-value>

                </context-param>

                <context-param>

                          <param-name>javax.faces.PROJECT_STAGE</param-name>

                          <param-value>Development</param-value>

                </context-param>

                <context-param>

                          <param-name>javax.faces.STATE_SAVING_METHOD</param-name>

                          <param-value>server</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>*.jsf</url-pattern>

                </servlet-mapping>

                <servlet-mapping>

                          <servlet-name>Faces Servlet</servlet-name>

                          <url-pattern>/faces/*</url-pattern>

                </servlet-mapping>

                <welcome-file-list>

                          <welcome-file>index.html</welcome-file>

                          <welcome-file>index.htm</welcome-file>

                          <welcome-file>index.jsp</welcome-file>

                          <welcome-file>default.html</welcome-file>

                          <welcome-file>default.htm</welcome-file>

                          <welcome-file>default.jsp</welcome-file>

                </welcome-file-list>

                <mime-mapping>

                          <extension>xcss</extension>

                          <mime-type>text/css</mime-type>

                </mime-mapping>

                <login-config>

                          <auth-method>BASIC</auth-method>

                </login-config>

                <context-param>

                <param-name>org.richfaces.LoadScriptStrategy</param-name>

                <param-value>DEFAULT</param-value>

                </context-param>

                <context-param>

                <param-name>org.richfaces.LoadStyleStrategy</param-name>

                <param-value>DEFAULT</param-value>

                </context-param>

      </web-app>

       

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

      <ui:composition 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:a4j="http://richfaces.org/a4j"

                xmlns:rich="http://richfaces.org/rich">

       

       

      <style>

      .rf-ac{

                width: 500px;

      }

      .rf-ac-itm-c {

                height: 220px;

      }

      </style>

      <h:form>

                                              <rich:calendar value="#{calendarBean.selectedDate}" id="calendar">

                                              </rich:calendar>

       

       

      </h:form>

      </ui:composition>