5 Replies Latest reply on Feb 16, 2009 10:25 AM by Nick Belaevski

    how to get calender fire backing bean action method?

    Troy Tarrrant Newbie

      Hi,

      Can someone tell me how to get an action method firing when the user clicks a date. Nothing I've tried seems to work.

      <a4j:form>
       <a4j:outputPanel>
       <rich:calendar id="date" popup="false"
       currentDateChangeListener="#{testPage.changeDateListener}"
       valueChangeListener="#{testPage.changeDateValue}"
       value="#{testPage.currentDate}" />
      
       </rich:calendar>
       </a4j:outputPanel>
      </a4j:form>
      
      


      Backing bean

      private Date currentDate = null;
      
      public Date getCurrentDate() {
       return currentDate;
      }
      
      public void setCurrentDate(Date currentDate) {
       this.currentDate = currentDate;
      }
      
      public void changeDateListener(CurrentDateChangeEvent event){
       log.info("changeDateListener()value=" + event.getCurrentDateString());
      }
      
      public void changeDateValue(ValueChangeEvent event){
       log.info("changeDateValue()old=" + event.getOldValue() + ";new=" + event.getNewValue());
      }
      
      


      None of the backing bean events fire when you use the mouse to change the date.

      What am I missing ?