title: PrimeFaces update single row of datatable from dialogue
body: <p>I have a requirement where I am using rowExpension inside a datatable. 
  which opens another datatable(sub table). 
  Below sub table I have one edit button.
  upon clicking edit it opens model dialogue and once I click save it closes the dialogue but I am not able to find a way to update that particular sub table. </p>
  
  <p>Below is the code snippet of subtable &amp; dialogue. Can anybody suggest me a way to update the particular subtable for which the edit button is clicked. </p>
  
  <pre><code>&lt;p:rowExpansion id="partyRows"&gt;
                                  &lt;p:dataTable 
                                      var="party" 
                                      value="#{pocAccountBean.parties}" 
                                      rows="20"
                                      id="test"
                                      widgetVar="partyTable"
                                      resizableColumns="true" 
                                      emptyMessage="No associated parties found." 
                                      rowIndexVar="idx"
                                      styleClass="testClass_#{account.accountNbr}"&gt;
  
                                      &lt;p:column headerText="Party Name" sortBy="#{party.partyKey}"&gt;
                                          &lt;h:outputText value="#{party.partyKey}" /&gt;
                                      &lt;/p:column&gt;
  
                                      &lt;p:column headerText="Party Type" sortBy="#{party.partyType}"&gt;
                                          &lt;h:outputText value="#{party.partyType}" /&gt;
                                      &lt;/p:column&gt;
  
                                      &lt;p:column headerText="Agent Code" sortBy="#{party.agentCode}"&gt;
                                          &lt;h:outputText value="#{party.agentCode}"/&gt;
                                      &lt;/p:column&gt;
  
                                      &lt;p:column headerText="Party Status" sortBy="#{party.partyStatus}"&gt;
                                          &lt;h:outputText value="#{party.partyStatus}" /&gt;
                                      &lt;/p:column&gt;
  
                                      &lt;p:column headerText="Education Level" sortBy="#{party.educationLevel}"&gt;
                                          &lt;h:outputText value="#{party.educationLevel}" /&gt;
                                      &lt;/p:column&gt;
  
                                      &lt;p:column headerText="Current Date" sortBy="#{party.currentDate}"&gt;
                                          &lt;h:outputText value="#{party.currentDate}" /&gt;
                                      &lt;/p:column&gt;
  
                              &lt;/p:dataTable&gt;
  
                              &lt;h:panelGrid columns="1" cellpadding="5" border="0"&gt;
                                   &lt;p:commandButton value="Edit" type="button" onclick="PF('dlg2').show();"/&gt;
                              &lt;/h:panelGrid&gt;
  
                              &lt;p:dialog header="Terms" widgetVar="dlg2" modal="true" height="400" width="800" id="d1" dynamic="true"&gt;
                                  &lt;h:inputText value="#{pocAccountBean.agentCode}" /&gt;
                                  &lt;p:commandButton action="#{pocAccountBean.setAgentCodeInParties()}" value="Save" onclick="PF('dlg2').hide();" update="@(.testClass_#{account.accountNbr})"&gt;&lt;/p:commandButton&gt;
                              &lt;/p:dialog&gt;
  
                          &lt;/p:rowExpansion&gt;
  </code></pre>