2 Replies Latest reply on Feb 14, 2009 4:45 AM by bronk horst

    ChangeListener for rich:calendar

    bronk horst Newbie

      Hi,

      and once again i`ve got a (maybe simple) question, hoping someone whould help me. I have a rich:calendar. When user changes Date, by typing into the input field or selecting by popup, a listener should be called and finaly the page has tu be rerendered. Rerendering works find, but none of my both listeners is called. Someone got the solution?

      <rich:calendar enableManualInput="true" id="calendar2" datePattern="dd.MM.yyyy HH:mm" popup="true"
       currentDateChangeListener="#{tour2plan.changeSingleStopToBeThereValueListener}"
       valueChangeListener="#{tour2plan.changeSingleStopToBeThereDateChangeListener}" >
       <a4j:support event="onchange" reRender="newPlanningRequest" />
       <a4j:support event="ondateselected" reRender="newPlanningRequest" />
       </rich:calendar>
      


      public void changeSingleStopToBeThereValueListener(ValueChangeEvent event) {
      
       System.out.println("calendar!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
       Date newSingleStopToBeThere = (Date) event.getNewValue();
       this.setSingleStopToBeThere(newSingleStopToBeThere);
      
       }
      


      
      
       public void changeSingleStopToBeThereDateChangeListener(CurrentDateChangeEvent event) {
      
       System.out.println("DAAAAAAAAAATECHAAAAAAAAAAAAANGE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
       Date newSingleStopToBeThere = (Date) (event.getCurrentDate());
       this.setSingleStopToBeThere(newSingleStopToBeThere);
      
       }