1 2 Previous Next 17 Replies Latest reply on Feb 28, 2012 3:14 PM by vasuatkkd Go to original post
      • 15. Re: RichFaces validation not firing
        swathivk

        I am facing the same issue I have a rich:calendar with a4j:support on onchanged event, with an action listener method. This method gets called on change of the date. However when I enter some invalid format, this never gets fired. All I want is an error message to show in the page if I enter invalid Date format.

         

        I am using the 3.3.3 version of RF.

         

        Could you throw some light please

        • 16. Re: RichFaces validation not firing
          vasuatkkd

          From your comment "

          if date entered manually converted successfully by default converter - validateBirthdate called. If date entered for examples as "justNotConvertableDateString"  - it will not be called as conversion already failed.".

           

          Once the conversion already failed the error message is not displyed on the page, even though we are able to see the conversion failed error message on the server logs.

           

          Feb 27, 2012 2:03:32 PM com.sun.faces.lifecycle.RenderResponsePhase execute

          INFO: WARNING: FacesMessage(s) have been enqueued, but may not have been displayed.

          sourceId=j_id65:effectiveDate[severity=(ERROR 2), summary=(Effective Date: '12344' could not be understood as a date.), detail=(Effective Date: '12344' could not be understood as a date. Example: 02/27/2012)]

           

          The same message is not displyed on the screen for the end user. We have the  h:messages defined on the page and still the message is not displayed.

           

          What needs to be done for the conversion failed message to be displayed on the client side? Please Advise.

           

          We are using RichFaces 3.3.3 Final.

          • 17. Re: RichFaces validation not firing
            vasuatkkd

            We were able to get the validation message displayed on the screen after we added a rich:message tied to the calendar control.

             

            We have the calendar component defined as below:

             

            <rich:calendar buttonIcon="../../images/calendar_icon.gif"
            disabled="#{readOnly}"
            boundaryDatesMode="scroll" style="width:75px"
            value="#{backingBean.effectiveDate}"
            datePattern="MM/dd/yyyy" enableManualInput="true"
            label="Effective Date" id="effectiveDate">
            <f:attribute name="maxlength" value="10" />
            <a4j:support event="onchanged" ajaxSingle="true"/>
            <a4j:support event="oninputblur" ajaxSingle="true"/>
            </rich:calendar>

             

            We have added a new <rich:message for="effectiveDate" errorStyle="color: red;" errorClass="errorMessage" /> enclosed within <a4j:outputPanel ajaxRendered="true">

            which is displaying the conversion failure error message.  Also we had to remove the limittolist="true" from a4j:support to get this working.

            1 2 Previous Next