3 Replies Latest reply on Jun 26, 2012 6:34 AM by Brendan Healey

    problem with update model from a4j:repeat in every time ajax request

    Marcus Vinicius Silva Newbie



      Every time I run an ajax call, the richfaces invokes the method on the model of component a4j:repeat ou a4j:datatable. I just wish the richfaces update the model of these, only when I add them in the list of objects to render.


      See below, how can i am doing it:


      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

      <html xmlns="http://www.w3.org/1999/xhtml"








      <ui:composition template="/template/commonLayout.xhtml">



          <ui:define name="content">


              .outhello {

              font-weight: bold;



          <a4j:region id="rg1">

          <h:form id="form1">

              <h:panelGrid columns="3">

                  <h:outputText value="Name:" />

                  <h:inputText value="#{testeBean.nome}" />

                  <a4j:commandButton value="Say Hello" render="out" execute="@form"  limitRender="true"/>



          <br />

          <a4j:outputPanel id="out">

              <h:outputText value="Hello #{testeBean.nome} !" styleClass="outhello" />



          <a4j:log />


          <a4j:outputPanel id="out2">


              <h:outputText value="Data2  #{testeBean.date} !" rendered="true" styleClass="outhello" />




         <a4j:outputPanel id="out3">

              <h:outputText value="Data2  #{clienteAction.clientes.size()} !" rendered="true" styleClass="outhello" />



         <a4j:repeat var="c" value="#{clienteAction.clientes}">



                      <h:outputText value="#{c.id}" />














      When i click on command button. It just try render e update model from out component and always call the method defined as #{clienteAction.clientes} by a4j:repeat or a4j:datatable component type.


      PS: I only have this problem with a4j:repeat or a4j:datatable.


      What am i doing wrong? Could someone help me?