5 Replies Latest reply on Jan 18, 2008 10:06 AM by acid_ant

    Problems with rich:calendar

    acid_ant

      Hi all! I'm a RichFaces beginner. Here is a test program which uses rich:calendar on its page

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <html xmlns="http://www.w3.org/1999/xhtml"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:a4j="http://richfaces.org/a4j"
       xmlns:rich="http://richfaces.org/rich">
       <h:form>
       <a4j:form id="form">
       <rich:calendar popup="true" datePattern="d/M/yy HH:mm"></rich:calendar>
       </a4j:form>
       </h:form>
      </html>
      

      I use following libraries: jsf-facelets-1.1.12.jar, richfaces-api-3.1.3.GA.jar, richfaces-impl-3.1.3.GA.jar, richfaces-ui-3.1.3.GA.jar and jboss-4.2.2.
      When I deploy project and access my test page through Firefox 2.0.0.11 - I can see only TextBox and Image. I can't change date.
      In Firebug I can see error "document.body has no properties". And there is error on server:
      16:26:42,476 WARN [SkinFactoryImpl] Init parameter for a skin name changed to org.richfaces.SKIN
      16:26:43,010 ERROR [STDERR] 16.01.2008 16:26:43 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/V:/jboss-4.2.2.GA/server/default/tmp/deploy/tmp25597MigoSite-exp.war/WEB-INF/lib/richfaces-ui-3.1.3.GA.jar!/META-INF/a4j.taglib.xml
      16:26:43,010 ERROR [STDERR] 16.01.2008 16:26:43 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/V:/jboss-4.2.2.GA/server/default/tmp/deploy/tmp25597MigoSite-exp.war/WEB-INF/lib/jsf-facelets-1.1.12.jar!/META-INF/jsf-html.taglib.xml
      16:26:43,026 ERROR [STDERR] 16.01.2008 16:26:43 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/V:/jboss-4.2.2.GA/server/default/tmp/deploy/tmp25597MigoSite-exp.war/WEB-INF/lib/jsf-facelets-1.1.12.jar!/META-INF/jstl-fn.taglib.xml
      16:26:43,041 ERROR [STDERR] 16.01.2008 16:26:43 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/V:/jboss-4.2.2.GA/server/default/tmp/deploy/tmp25597MigoSite-exp.war/WEB-INF/lib/jsf-facelets-1.1.12.jar!/META-INF/jsf-ui.taglib.xml
      16:26:43,041 ERROR [STDERR] 16.01.2008 16:26:43 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/V:/jboss-4.2.2.GA/server/default/tmp/deploy/tmp25597MigoSite-exp.war/WEB-INF/lib/richfaces-ui-3.1.3.GA.jar!/META-INF/ajax4jsf.taglib.xml
      16:26:43,073 ERROR [STDERR] 16.01.2008 16:26:43 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/V:/jboss-4.2.2.GA/server/default/tmp/deploy/tmp25597MigoSite-exp.war/WEB-INF/lib/richfaces-ui-3.1.3.GA.jar!/META-INF/richfaces.taglib.xml
      16:26:43,073 ERROR [STDERR] 16.01.2008 16:26:43 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/V:/jboss-4.2.2.GA/server/default/tmp/deploy/tmp25597MigoSite-exp.war/WEB-INF/lib/richfaces-ui-3.1.3.GA.jar!/META-INF/rich.taglib.xml
      16:26:43,104 ERROR [STDERR] 16.01.2008 16:26:43 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/V:/jboss-4.2.2.GA/server/default/tmp/deploy/tmp25597MigoSite-exp.war/WEB-INF/lib/jsf-facelets-1.1.12.jar!/META-INF/jsf-core.taglib.xml
      16:26:43,120 ERROR [STDERR] 16.01.2008 16:26:43 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/V:/jboss-4.2.2.GA/server/default/tmp/deploy/tmp25597MigoSite-exp.war/WEB-INF/lib/jsf-facelets-1.1.12.jar!/META-INF/jstl-core.taglib.xml
      
      

      In IE6 the component displays correctly, but I can't change time. What are my mistakes?

        • 1. Re: Problems with rich:calendar
          luisfelipe

          Hi!

          I am having the same problem!

          Is set as your faces-config.xml?

          • 2. Re: Problems with rich:calendar
            dkarr

            I'm not that experienced with this, but I would think you should remove the outer plain "h:form".

            • 3. Re: Problems with rich:calendar
              acid_ant

              Thats my faces-config.xml

              <?xml version='1.0' encoding='UTF-8'?>
              
              <faces-config version="1.2" 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-facesconfig_1_2.xsd">
              
               <application>
               <message-bundle>MessageResources</message-bundle>
               </application>
              
               <managed-bean>
               <description>For richfaces sample - calendar</description>
               <managed-bean-name>calendarBean</managed-bean-name>
               <managed-bean-class>com.test.bbean.CalendarBean</managed-bean-class>
               <managed-bean-scope>session</managed-bean-scope>
               </managed-bean>
              </faces-config>
              

              When I removed h:from, then I have the same bug

              • 4. Re: Problems with rich:calendar
                dkarr

                I just spent a couple minutes googling that error message, and I think that's a red herring. It's not actually an error, it's just inadvertently verbose logging. The fact that your calendar doesn't show up is obviously an error, but those log messages are not related to it.

                • 5. Re: Problems with rich:calendar
                  acid_ant

                  Thanks a lot! The problem solved (fix web.xml, faces-config.xml and xhtml page)- the error was definitely connected with "red herring". Thank you for explanation of its origin.