2 Replies Latest reply on Jan 9, 2010 10:05 AM by israel.bgf

    rich:messages for just one message

    israel.bgf

      First of all, sorry if this was already asked and answered, but i didn't find a way to search for a topic in the richfaces community with this new forum layout (the old one was ugly, but did work ). Anyway here it goes:

       

      How can i make the rich:messages component show only the first error (and not all errors) that are triggered by the rich:graphValidator? Example:

       

      <a4j:form>

       

       

           <rich:graphValidator>

                <h:inputText value="#{bean.value1}"/>

                <h:inputText value="#{bean.value2}"/>

           </rich:graphValidator>

       

           <a4j:commandButton value="Submit"/>

       

           <rich:messages/>


      </a4j:form>

       

      If the two inputs trigger errors on the submit (i'm using Hibernate Validator), two messages are throw.

       

      - value1 cant have more than 5 characters

      - value2 cant have more than 5 characters

       

      How can I configure it to show only the first error?

       

      Thanks in advance,

       

      and happy new year for the richfaces-team!