0 Replies Latest reply on Nov 10, 2011 10:34 PM by Jack Robert

    rich:calandar issue

    Jack Robert Newbie



            I use rich:calandar component for select date.

           Normaly click this component, then calandar popup appear, then select the date.


      My problem is , Some times i can't click the component, It means calandar popup not appear.

                               If i clear my browser history, and re deploy my application, then it will works.                        

                               I don't know how to resolve this problem.


      In my application, use  JSF 1.2 + Richfaces and Apache Tomcat 6.0.29.





      <%@page contentType="text/html" pageEncoding="UTF-8"%>
      <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
      <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
      <%@ taglib uri="http://richfaces.org/rich" prefix="rich" %>
      <%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
                  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">                      
                  <h:form id="calendarform" binding="#{CalendarDemo.initForm}"> 
                      <rich:panel id="calendarPanel">
                          <a4j:outputPanel id="calendarOutputPanel">
                              <rich:calendar id="birthDate"
                              <a4j:commandButton value="Show Selected Date" action="#{CalendarDemo.showSelectedDate}"
                              <h:outputText value="Selected Date is : #{CalendarDemo.selectedDate}"/>


      Then my managed bean class 'CalendarDemo.java'



      import java.util.Date;
      import javax.faces.component.html.HtmlForm;
      public class CalendarDemo
          private HtmlForm initForm;
          private Date testDate;
          private String selectedDate;
          public String showSelectedDate()
              if (testDate != null)
                  selectedDate = testDate.toString();
              return "";
          public HtmlForm getInitForm()
              testDate = null;
              selectedDate = "";
              return initForm;
          public void setInitForm(HtmlForm initForm){
              this.initForm = initForm;
          public Date getTestDate(){
              return testDate;
          public void setTestDate(Date testDate) {
              this.testDate = testDate;
          public String getSelectedDate() {
              return selectedDate;
          public void setSelectedDate(String selectedDate){
              this.selectedDate = selectedDate;


      Help me.

      Thanks for your effort.