2 Replies Latest reply on Jul 10, 2009 8:24 AM by daswidanja

    Correct use of ajaxRendered="true" and limitToList="true"


      The theory:
      ajaxRendered="true" : area on a page that should be updated as a response on any Ajax request.
      "limitToList" attribute allows to dismiss the behavior of the ajaxRendered=true. All output panels with ajaxRendered="true" is ignored.

      Now, I need to create 2 pages with validations,
      one page based on general template using <rich:messages ajaxRendered="true" > showing all validation errors on a action,

      second page where I need to show a error on every event="onblur". On the second page an error is showing using <rich:ajaxValidator event="onblur" /> and <rich:message for="ajaxFelt1" />

       <h:outputText value="Feld1" />
       <h:inputText value="#{capriMBean.ajaxFelt1}" id="ajaxFeld1">
       <rich:ajaxValidator event="onblur" />
       </h:inputText>
       <rich:message for="ajaxFeld1" />
      


      The problem here is that error is rendered twice : with <rich:messages ajaxRendered="true" > and <rich:message for="ajaxFeld1" />

      How to show the error only ones, using <rich:message for="ajaxFeld1" /> ?

      Option "limitToList" should give us this result, but
      <rich:ajaxValidator event="onblur" limitToList="true" reRender="something"/> still makes messages to be rendered out.



        • 1. Re: Correct use of ajaxRendered=
          ilya_shaikovsky

          should works in 3.3.1 GA.

          • 2. Re: Correct use of ajaxRendered=

            What is working is:
            <h:inputText value="#{capriMBean.ajaxFelt1}" id="ajaxFeld1">
            <rich:ajaxValidator event="onblur" />
            <a4j:support event="oncomplete" limitToList="true" reRender="..."/>
            </h:inputText>

            This prevent a rich:messages but in addition to this prevent rich:message too.
            In other words, I can't find a way to show only validation error using <rich:message for="ajaxFeld1" /> and <rich:ajaxValidator event="onblur" /> when < rich:messages /> is placed on the same page.