1 Reply Latest reply on Nov 5, 2008 5:26 AM by ilya_shaikovsky

    rich:messages shows all messages instead of actual message

    nimo22

      How can force that the rich:messages shows the message only for the component which causes the message?

      Now, the rich:message shows all messages (warnings, failures, informations).

      For example:

      <rich:messages>
      
      <h:form>
      
      </h:form>
      
      <s:div id="name">
      <h:inputText id="nameValue" value="..." required="true">
      <a4j:support event="onblur" reRender="name" bypassUpdates="true" />
       </h:inputText>
       <rich:message for="nameValue"/>
      </s:div>
      
      <s:div id="age">
      <h:inputText id="ageValue" value="..." required="true">
      <a4j:support event="onblur" reRender="age" bypassUpdates="true" />
       </h:inputText>
       <rich:message for="ageValue"/>
      <s:div/>


      Now, when I enter the inputText nameValue and leave it empty, then ALL messages occur instead of only the message for inputText:

      - Name required
      - Age required



      I want that only the message

      - Name required
      


      occurs instead of all messages.

      Another point is, that all rich:message-tags also become reRendered, even I explicitly say only reRender="name".

      How can I avoid this ?


        • 1. Re: rich:messages shows all messages instead of actual messa
          ilya_shaikovsky

          use ajaxSingle="true" and limittolist="true" on your supports.

          And b.t.w. why did you think that unexpected behavior should be default? messages designed to show all the messages in JSF impl and in RF impl.. And it works as designed. RF messages designed to be updated automatically without having to reRender them explicitly to make developers life easier and it works so.