3 Replies Latest reply on Jan 31, 2008 10:13 AM by Ilya Shaikovsky

    rich:calendar - how do I validate if manual input enabled?

    Kosta Kontos Newbie

      Hi

      I have followed the example of rich:calendar on the livedemo website. Thus my rich:calendar component sits inside an a4j:outputPanel component.

      I was going to leave the rich:calendar's attribute "enableManualInput" to its default of false (and thereby not have to be concerned with validating the date) but unfortunately I need manual editing enabled, since I am dealing with very old dates, and scrolling back 100 years is not fun!

      But now my validation rich:message component doesn't associate to the input field correctly. I get the following in my console output:

      [lifecycle] WARNING: FacesMessage(s) have been enqueued, but may not have been displayed.


      I have double checked that the "id" attribute of the a4j:outputPanel corresponds to the validator's "for" attribute - so why does my webapp not display the validation message (whether pass or fail)?

      Below is my code JSF code:

       <h:outputText value="Birthday" />
       <h:outputText value="#{contactController.contact.personalDetailsBirthday}">
       <f:convertDateTime pattern="yyyy-MM-dd" />
       </h:outputText>
       <a4j:outputPanel id="personalDetailsBirthday" layout="block">
       <rich:calendar value="#{contactController.contact.personalDetailsBirthday}"
       popup="true"
       datePattern="yyyy-MM-dd"
       enableManualInput="true"
       showApplyButton="false"/>
       </a4j:outputPanel>
       <rich:message for="personalDetailsBirthday">
       <f:facet name="passedMarker">
       <h:graphicImage value="/includes/images/tick.png" />
       </f:facet>
       <f:facet name="errorMarker">
       <h:graphicImage value="/includes/images/cross.png" />
       </f:facet>
       </rich:message>
      


      Thanks.