title: Primefaces Datatable update footer go in loop
body: <p>I am using primefaces 4.0. I have a datatable which simply 7 columns and each columns has an inputText which is an integer. I use the collector to add a row to the table. i want when i move from one input field to another and change the value the sum of each columns appear on footer. I managed to do this by using </p>
  
  <pre class="lang-xhtml prettyprint-override"><code>&lt;h:inputText size="2" value="#{rec.monday.tid}"&gt;
     &lt;p:ajax event="blur" update="@form" /&gt;
  &lt;/h:inputText&gt;
  </code></pre>
  
  <p>The problem is that first request goes in to a loop and it doesnt allow to change the other values. I tried to only update one footer each time by using this code. It doesnt seems to work.</p>
  
  <pre class="lang-xhtml prettyprint-override"><code>&lt;p:column &gt;
          &lt;f:facet name="header"&gt;
          &lt;h:outputText value="#{newRecord.record.monday.day}" /&gt;
          &lt;/f:facet&gt;
          &lt;h:inputText size="2" value="#{rec.monday.tid}"&gt;
                  &lt;p:ajax event="blur" update=":form:records:mon" /&gt;
          &lt;/h:inputText&gt;
          &lt;f:facet name="footer"&gt;
             &lt;h:outputText id="mon" value="#{newRecord.totalSun}" /&gt;
      &lt;/f:facet&gt;
  &lt;/p:column&gt;
  </code></pre>
  
  <pre class="lang-xhtml prettyprint-override"><code>&lt;h:form id="form"&gt;
  
          &lt;p:growl id="msgs" /&gt;
  
          &lt;p:panel header="Create a new record"&gt;
              &lt;h:panelGrid columns="2" id="grid"&gt;
                  &lt;h:outputLabel value="time : *" for="txt_time"&gt;&lt;/h:outputLabel&gt;
                  &lt;p:inputText id="txt_time" value="#{newRecord2.record.tid}" required="true" /&gt;
  
                  &lt;p:inputText id="txt_time2" value="#{newRecord2.record.tid2}" required="true" /&gt;
  
                  &lt;p:commandButton value="Reset" type="reset" /&gt;
                  &lt;p:commandButton id="btn_add" value="Add" update="records msgs @parent" action="#{newRecord2.reinit}"&gt;
                      &lt;p:collector value="#{newRecord2.record}" addTo="#{newRecord2.records}" /&gt;
                  &lt;/p:commandButton&gt;
              &lt;/h:panelGrid&gt;
          &lt;/p:panel&gt;
  
          &lt;p:outputPanel id="records"&gt;
              &lt;p:dataTable id="recordsTable" value="#{newRecord2.records}" var="record"&gt;
  
                  &lt;p:column&gt;
                      &lt;f:facet name="header"&gt;
                          &lt;h:outputText value="tid" /&gt;
                      &lt;/f:facet&gt;
                      &lt;h:inputText value="#{record.tid}"&gt;
                          &lt;p:ajax update="total"&gt;&lt;/p:ajax&gt;
                      &lt;/h:inputText&gt;
                      &lt;f:facet name="footer"&gt;
                          &lt;h:outputText id="total" value="#{newRecord2.totalTid}" /&gt;
                      &lt;/f:facet&gt;
                  &lt;/p:column&gt;
                  &lt;p:column&gt;
                      &lt;f:facet name="header"&gt;
                          &lt;h:outputText value="tid" /&gt;
                      &lt;/f:facet&gt;
                      &lt;h:inputText value="#{record.tid2}"&gt;
                          &lt;p:ajax update="total2"&gt;&lt;/p:ajax&gt;
                      &lt;/h:inputText&gt;
                      &lt;f:facet name="footer"&gt;
                          &lt;h:outputText id="total2" value="#{newRecord2.totalTid2}" /&gt;
                      &lt;/f:facet&gt;
                  &lt;/p:column&gt;
  
  
  
                  &lt;p:column&gt;
                      &lt;f:facet name="header"&gt;
                          &lt;h:outputText value="Operation" /&gt;
                      &lt;/f:facet&gt;
                      &lt;p:commandLink value="Remove" update=":form:records" process=":form:records"&gt;
                          &lt;p:collector value="#{record}" removeFrom="#{newRecord2.records}" /&gt;
                      &lt;/p:commandLink&gt;
                  &lt;/p:column&gt;
  
              &lt;/p:dataTable&gt;
          &lt;/p:outputPanel&gt;
  
      &lt;/h:form&gt;
  </code></pre>
  
  <p>Is the anybody who can help me? is it possible to update the values on client side?</p>