2 Replies Latest reply on May 23, 2009 11:15 AM by Adi Katz

    rich:calendar does not update when disabled

    Adi Katz Novice

      Unlike other input components, it is impossible to update the calendar's state from the server when it is disabled. According to the application logic my calendar is disabled for user input in some situations. Nevertheless I would like to update it on he server side and make the ui component update accordingly.
      It works with all other input components, why not calendar ?

      Thanks

        • 1. Re: rich:calendar does not update when disabled
          Ilya Shaikovsky Master

          works ok for me

           <a4j:outputPanel id="calendar" layout="block">
           <rich:calendar value="#{calendarBean.selectedDate}" disabled="true"
           locale="#{calendarBean.locale}"
           popup="#{calendarBean.popup}"
           datePattern="#{calendarBean.pattern}"
           showApplyButton="#{calendarBean.showApply}" cellWidth="24px" cellHeight="22px" style="width:200px"/>
           <h:inputText value="#{calendarBean.selectedDate}"/>
           </a4j:outputPanel>
           <a4j:commandButton reRender="calendar" ajaxSingle="true" action="#{calendarBean.changeDate}">
          
          


          seems your forgot that if the control which changes the date should be immediate or ajaxSingle.

          • 2. Re: rich:calendar does not update when disabled
            Adi Katz Novice

            Thanks Iliya,

            I still think there is something wrong with the calendar. It is true that actions
            that takes place up to, and including the INVOKE_APPLICATION stage, will update the component correctly. But any change to the value after that ( and before the RENDER_RESPONSE stage ) will be ignored.
            This is happening only for the value of the calendar, the tool tip ( title ) will update correctly.

            Any ideas ?

            Thanks