title: How update just specific cell in primefaces dataTable
body: <p>I'm creating a dynamic datatable full of input fields. Sometimes when user insert values in some inputs, an specific cell should be updated, and only this cell. I thought it could be simple, but yet didn't make it work.
  The cell I want update is "valor total", this cell should be updated when the value of two others cell change:</p>
  
  <p><img src="https://i.stack.imgur.com/s0cdB.png" alt="cell to update"></p>
  
  <p><b>EDITED</b></p>
  
  <p><img src="https://i.stack.imgur.com/EmLWj.png" alt="js chrome"></p>
  
  <p>I've tryied f:ajax with complete id and got "Component with id:lancamentoNF:popupLancamentoNF:tabelaItensNF:0:valorTotalItem not found". Changed to p:ajax and no errors happen but it doesn't update!!</p>
  
  <pre><code>&lt;h:panelGroup id="painelItensNF" layout="block" styleClass="hrgi-div-form aba-lancamento-nf clearfix" style="overflow:auto;"&gt;
      &lt;h:panelGroup layout="block" style="width: 1700px;"&gt;
          &lt;p:dataTable id="tabelaItensNF" value="#{modeloTabelaDinamicaItemNF.itens}" var="itemEmbrulhado" styleClass="tabelaDinamica" height="174" style="width: 100%;" rowIndexVar="indice"&gt;
              ... (some columns)
              &lt;p:column style="width: 5%"
                        headerText="quantidade"&gt;
                  &lt;hrgi:spinner id="quantidadeItem"
                                value="#{itemEmbrulhado.item.produto.detalheTributavel.quantidade}"
                                dinheiro="false"
                                fator="#{itemEmbrulhado.item.produto.detalheTributavel.unidadeFracionada?0.01:1}"
                                local="pt-BR" min="0.00" width="70"&gt;
                      &lt;p:ajax event="change"
                              update="lancamentoNF:popupLancamentoNF:tabelaItensNF:#{indice}:valorTotalItem"
                              listener="#{controladorPopupLancamentoNF.calcularValorTotalItem(itemEmbrulhado)}" global="false" /&gt;
                      &lt;f:convertNumber
                              maxFractionDigits="#{itemEmbrulhado.item.produto.detalheTributavel.unidadeFracionada?2:0}"
                              minFractionDigits="#{itemEmbrulhado.item.produto.detalheTributavel.unidadeFracionada?2:0}"
                              locale="pt-BR"
                              for="quantidadeItem"/&gt;
                  &lt;/hrgi:spinner&gt;
              &lt;/p:column&gt;
              &lt;p:column style="width: 5%"
                        headerText="valor unitario"&gt;
                  &lt;hrgi:spinner id="valorUnitarioItem"
                                value="#{itemEmbrulhado.item.produto.detalheTributavel.valorUnitario}"
                                dinheiro="true" fator="0.01" local="pt-BR" min="0.00" width="70"&gt;
                      &lt;p:ajax event="change" 
                              update="lancamentoNF:popupLancamentoNF:tabelaItensNF:#{indice}:valorTotalItem"
                              listener="#{controladorPopupLancamentoNF.calcularValorTotalItem(itemEmbrulhado)}" global="false"/&gt;
                      &lt;f:convertNumber type="currency" currencyCode="BRL" currencySymbol="R$ "
                                       maxFractionDigits="10" minFractionDigits="2" locale="#{cc.attrs.local}"
                                       for="valorUnitarioItem"/&gt;
                  &lt;/hrgi:spinner&gt;
              &lt;/p:column&gt;
              &lt;p:column style="width: 3%"
                        headerText="valor total"&gt;
                  &lt;h:outputText id="valorTotalItem" value="#{itemEmbrulhado.item.produto.valorTotal}"&gt;
                      &lt;f:convertNumber type="currency" currencyCode="BRL" currencySymbol="R$ "
                                       maxFractionDigits="2" minFractionDigits="2" locale="pt-BR"
                                       for="valorUnitarioItem"/&gt;
                  &lt;/h:outputText&gt;
              &lt;/p:column&gt;
              ... (more columns)
          &lt;/p:dataTable&gt;
      &lt;/h:panelGroup&gt;
  &lt;/h:panelGroup&gt;
  </code></pre>
  
  <p>It works when I update the panelGroup "painelItensNF" with complete id, but the focus is lost and user should find the input he was working to continue...</p>