0 Replies Latest reply on Jan 10, 2008 6:41 PM by Tomas Huryn

    calendar - Ajax update does not rerender second one

    Tomas Huryn Newbie

      <rich:calendar mode="ajax" enableManualInput="true" value="#{bean.propertyFrom}" popup="true" local="cs" showApplyButton="true" id="calendarFrom" datePattern="d.M.yyyy HH:mm" ajaxSingle="true" reRender="calendarFromTo" >
      <a4j:support event="ondateselected" reRender="calendarTo" ajaxSingle="true" />
      <a4j:support event="oninputchange" reRender="calendarTo" ajaxSingle="true" />
      <a4j:support event="oncollapse" reRender="calendarTo" ajaxSingle="true" />

      <rich:calendar mode="ajax" enableManualInput="true" value="#{bean.propertyTo}" popup="true" local="cs" showApplyButton="true" id="calendarTo" datePattern="d.M.yyyy HH:mm" ajaxSingle="true" >
      <a4j:support event="ondateselected" ajaxSingle="true" />
      <a4j:support event="oninputchange" ajaxSingle="true" />
      <a4j:support event="oncollapse" ajaxSingle="true" />


      Date propertyFrom;
      Date propertyTo;

      Date getPropertyFrom() {
      return this.propertyFrom;

      Date getPropertyTo() {
      return this.propertyTo;

      void setPropertyFrom(Date propertyFrom) {
      this.propertyFrom = propertyFrom;
      this.propertyTo = propertyFrom;

      void setPropertyTo(Date propertyTo) {
      this.propertyTo = propertyTo;

      - when I change date or time in the fist caledar (ID="calendarFrom"), getter method of the second calendar will be called, but date in the browser will remain old:
      1) change date in calendarFrom
      2) system call setPropertyFrom() method
      3) system call getPropertyTo() method
      4) in browser date will not change the value

      browser: Firefox 2.0, konqueror
      richfaces: 3.1.3.GA
      jboss: 4.2.0