1 Reply Latest reply on Jun 24, 2013 7:30 AM by rhanus

    render="@none" works incorrectly with ajaxRendered="true"

    agori

      As far as I know, the default value for render attribute is @none. If render is @none, no ajaxRendered component is rendered after an AJAX request. Worse, rich:message are not automatically displayed if for example a validation rule is triggered by an inputText:

       

      <h:inputText id="text" value="#{bean.text}" required="true">
           <a4j:ajax execute="blur" />
      </h:inputText>
      <rich:message for="text" />
      

       

      This is a quite frequent piece of JSF code. If a user gives focus and then leaves the input, no message is displayed in RichFaces 4.3.2.Final. Instead if I render whatever component, for example

       

      <h:inputText id="text" value="#{bean.text}" required="true">
           <a4j:ajax execute="blur" render="@this" />
      </h:inputText>
      <rich:message for="text" />
      

       

      the message is displayed. This is not what I expect from RichFaces.

       

      Do I really need to render something just to trigger the rendering of an ajaxRendered component like rich:message or a4j:outputPanel?

        • 1. Re: render="@none" works incorrectly with ajaxRendered="true"
          rhanus

          this looks a quite odd, I suppose you didn't want to execute a component named "blur"

          <a4j:ajax execute="blur" />

          if you are supposed to make use client side validation try the following code:

          <h:inputText value="#{userBean.name}" id="name">

               <f:validateRequired />

             <rich:validator />

          </h:inputText>

          <rich:message for="name" />

          for details take a look at showcase