1 Reply Latest reply on Sep 15, 2009 9:53 PM by Manuel Palacio

    Custom validator and rich:calendar

    Andy Deighton Newbie
      Hey all,
      I've written a very simple, test validator (using @Validator annotation). It works on normal UI elements like ui:inputText. Great.
      However, the same validator isn't triggered at all when plugged into a rich:calendar.
      I use the validator="myValidator" attribute. The calendar also has its entry field enabled.
      No matter what I enter into the entry field, the validator is never called. Like I said, the validator code is fine as it works for other objects, just not rich:calendar.
      Any clues?

      Andy


      <a4j:outputPanel id="calendarPanel" layout="block">
        <rich:calendar
          todayControlMode="select"
          eventsQueue="invoiceQueue"
          popup="true"
          enableManualInput="true"
          value="#{salesInvoice.issuedDate}"
          disabled="#{salesInvoice.issueDateType eq 'AUTOMATIC' or salesInvoiceAction.selectedLine ne null}"
          required="true"
          id="issueDateInputDate"
          datePattern="dd/MM/yyyy"
          firstWeekDay="1"
          immediate="true"
          validator="issueDateValidator"
        >
        <a4j:support bypassUpdates="true" event="oninputblur" ajaxSingle="true" reRender="datePanel,lineItemsTable,messages"/>
        <a4j:support bypassUpdates="true" event="onchanged" ajaxSingle="true" reRender="datePanel,lineItemsTable,messages"/>
        </rich:calendar>
      </a4j:outputPanel>