3 Replies Latest reply on Oct 15, 2007 6:13 AM by bonaparte vidal

    rich:calendar and NextMonth/NextYear

    bonaparte vidal Newbie

      Dear all,

      I'm a bit confused when using component rich:calendar.
      In fact, when ever i want to change the month or the year of the displayed calendar, there is an ajax submit of the including form, with all the data validations and potential error messages.

      Is there a way to override this default behavior?

      My very simple code:
      As you can see, there are two fields, nom and calendar, and the two are required.
      My problem is: whenever i want to change the month or the year with nom empty, i have a validation message error for this field.

      <!-- content -->
       <ui:define name="content">
       <h:form id="editClientForm">
      
       <s:validateAll>
      
      
      
       <rich:tabPanel switchType="client">
       <rich:tab label="#{messages['edit_client.tab_civilite']}">
      
       <h:panelGrid columns="3">
      
      
      
       <h:outputLabel for="nom" value="#{messages['edit_client.nom']}"/>
       <h:inputText id="nom" value="#{clienttest.nom}" required="true">
       </h:inputText>
       <rich:message for="nom"
       errorLabelClass="errorLabel">
       <f:facet name="errorMarker">
       <h:graphicImage value="/img/error.gif" />
       </f:facet>
       </rich:message>
      
      
       <h:outputLabel for="dateNaissance" value="#{messages['edit_client.dateNaissance']}"/>
       <rich:calendar id="dateNaissance" value="#{clienttest.dateNaissance}" required="true" oncomplete="function(){}" mode="client"
       bypassUpdates="true" >
       </rich:calendar>
       <rich:message for="dateNaissance"
       errorLabelClass="errorLabel">
       <f:facet name="errorMarker">
       <h:graphicImage value="/img/error.gif" />
       </f:facet>
       </rich:message>
      
      
       </h:panelGrid>
      
       </rich:tab>
      
      
       </rich:tabPanel>
      
      
      
       <p class="commands">
       <!-- Attention s:button ne post pas le formulaire il faut donc utiliser h:commandButton -->
       <h:commandButton id="save"
       action="save" value="#{messages['edit_client.button_save']}" styleClass="actionButton"/>
       #{spacer}
       <s:button id="cancel" action="cancel" value="#{messages['edit_client.button_cancel']}" styleClass="actionButton" />
       </p>
      
       </s:validateAll>
       </h:form>
      
      
       </ui:define>
      


      Thanks a lot for any tip on this subject,
      Regards.