2 Replies Latest reply on Oct 9, 2007 6:05 AM by Kerdudou Ronan

    rich:calendar performance

    Kerdudou Ronan Apprentice


      thanks for the new component rich:calendar, it's very good.

      I don't understand exactly how the dates in the calendar are generated, but it seems that in client mode it's javascript and in ajax mode it asks the server... but i'm not sure...
      for best performance I would like to have the calendar in client mode but submit changes by ajax... because having an ajax request at each month change is very slow... just submit ajax on selection of a date.
      reading other posts it seems that some weird combinason with a4j support can make it but i don't understand it...
      the comportment i describe should be a standard, i think...

      also, i would have like to have a 'inputSize' attribute to define the size of the input. instead of it i defined a new css class to define a width...
      a maxInputSize with the size of the date pattern can also be a good idea.

      See what you can do for future releases.

      and thanks again for your work !

        • 1. Re: rich:calendar performance
          Kerdudou Ronan Apprentice


          i understand better now... it's just not supposed to act like i thought it would...
          the mode doesn't apply for the value, but only for the component...
          let's add a4j:support for ondateselected and oninputchange
          or add listeners for theses events (in calendar's properties).

          So it's just OK but lacks of documentation and exemples...
          here is my test code :

          <h:panelGroup id="components">
           <a4j:region id="dat1">
           <rich:calendar value="#{handler_test.valeurs1.dateTest}"
           inputClass="input colonne_date"
           <a4j:support event="ondateselected" reRender="repeater"/>
           <a4j:support event="oninputchange" reRender="repeater"/>
           <a4j:status startText=" MàJ" stopText=" OK" for="dat1" />
           <%-- ... --%>
          <h:panelGroup id="repeater">
           <h:outputText value="#{handler_test.valeurs1.dateTest}">
           <f:convertDateTime pattern="#{contexte.beanContexte.beanContexteLangue.formatDate}" />
           <%-- ... --%>

          • 2. Re: rich:calendar performance
            Kerdudou Ronan Apprentice

            just for documentation, tomahawk equivalent version :

            <t:inputCalendar value="#{handler_test.valeurs2.dateTest}"
             <f:convertDateTime pattern="#{contexte.beanContexte.beanContexteLangue.formatDate}" />
             <a4j:support event="onchange" reRender="repeater"/>

            but in current versions the RichFaces one is better.