2 Replies Latest reply on May 7, 2011 7:13 AM by a.bond

    calendar do not work

    a.bond

      Hello!

       

      I am new to RF, and I try to make a simle jsf page with oly one rich:calendar control. It look like this:

       

       

      <?xml version="1.0" encoding="UTF-8"?>
      <!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:a4j="http://richfaces.org/a4j"
            xmlns:rich="http://richfaces.org/rich" xmlns:h="http://java.sun.com/jsf/html"
            xmlns:ui="http://java.sun.com/jsf/facelets"
            xml:lang="en" lang="en">
      <head>
          <title></title>
      </head>
      <body>
      <h:form>
          <rich:calendar value="#{testBean.date}"></rich:calendar>
      </h:form>
      </body>
      </html>
      
      

       

      TestBean look like this:

       

       

      package test;
      
      
      import javax.enterprise.context.ConversationScoped;
      import javax.enterprise.context.RequestScoped;
      import javax.faces.bean.ManagedBean;
      import javax.faces.bean.ViewScoped;
      import javax.inject.Named;
      import java.io.Serializable;
      import java.util.Calendar;
      import java.util.Date;
      
      
      @ViewScoped
      @Named
      public class TestBean implements Serializable
      {
          private Date    date    = Calendar.getInstance().getTime();
      
      
          public Date getDate()
          {
              return date;
          }
      
      
          public void setDate(Date date)
          {
              this.date = date;
          }
      }
      
      

       

      After deploy I can see calendar control with cuttent date and time, but it's not clickable or editable. Settinng disabled to false do not solve my problem.

      Maybe someone could help me.

       

      I use JBoss AS 6.0 final and RF 4 final.

       

      Thanks!

        • 1. calendar do not work
          ppitonak

          Hi Andrey,

           

          try using <h:head> instead of <head> and <h:body> instead of <body>.

           

          Regards,

          Palo

          1 of 1 people found this helpful
          • 2. calendar do not work
            a.bond

            Thank you Pavol!

             

            After I add prefix I get error when try to load my page and recently find out that I also need to include cssparser and sac jars into my deployment. Now everything works fine!