0 Replies Latest reply on Jun 29, 2011 2:50 AM by paddy3k

    Validation don't works for rich:calendar

    paddy3k

      Hi there,

       

      I tried different types of validation for rich:calendar. Validation seems to work, but the message isn't shown.

      Here is an example using the graphValidator :

       

       

      {code}

       

      <rich:graphValidator value="#{wpCalendar}">

        <h:outputText value="Begin Date" />

        <rich:calendar value="#{wpCalendar.selectedStartDate}" id="chartStartDate" locale="#{wpCalendar.locale}"

           popup="#{wpCalendar.popup}" datePattern="#{wpCalendar.pattern}" showApplyButton="false" cellWidth="24px"

           cellHeight="22px" style="width:200px">

        </rich:calendar>

        <rich:message for="chartStartDate" />  

      </rich:graphValidator>

       

      {code}

       

      and bean code snippet :

       

       

      {code}

      @NotNull(message = "Date must be set")

      private Date selectedStartDate;

      {code}

       

      JSR-303 also don't work:

       

       

      {code}

        <h:outputText value="Begin Date" />

        <rich:calendar value="#{wpCalendar.selectedStartDate}" id="chartStartDate" locale="#{wpCalendar.locale}"

           popup="#{wpCalendar.popup}" datePattern="#{wpCalendar.pattern}" showApplyButton="false" cellWidth="24px"

           cellHeight="22px" style="width:200px">

           <rich:validator/>

        </rich:calendar>

        <rich:message for="chartStartDate" />  

      {code}

       

      any ideas ?

       

      greetings