title: Update form from dialog
body: <p>I have a dataTable within a form; in the dataTable I have a button which pops up a dialog if clicked; after editing(or not) I want to close the dialog and refresh the datatable.</p>
  
  <p>I want to to this through the ajax event "close", so even if the clicks on cancel button, or closes the dialog by clicking escape or the "x" in the bar -> he should land in my closeDialog()-method and refresh the dataTable.</p>
  
  <p>The only issue is that i don't know how to refresh the dataTable.</p>
  
  <p>Here is my dataTable(in the header is my button which pops up the dialog):</p>
  
  <pre><code>&lt;p:dataTable id="nzTable" widgetVar="nzTableW" emptyMessage="Keine Todos gefunden"
          var="currentTableItem" value="#{nichtZugTableController.dataModel}" paginator="true" rows="15"
          rowsPerPageTemplate="5,10,15,20, 25, 30, 1000" lazy="false" paginatorPosition="bottom"
          paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
          currentPageReportTemplate="( Treffer {totalRecords} ) ( Seite {currentPage} von {totalPages} )"
          filteredValue="#{nichtZugTableController.filteredTodos}" filterDelay="500" filterEvent="keyup"
          editable="true" sortBy="#{currentTableItem.angelegtAm}" sortOrder="descending"
          rendered="#{loginBean.loggedIn and mitViewController.leiterViewActiv and leiterTreeController.nzTableActive}"
          selection="#{nichtZugTableController.selectedNZTodos}" rowKey="#{currentTableItem.meldungId}"
          resizableColumns="false" style="min-width:1200px !important; "&gt; 
  
          &lt;f:facet name="header"&gt;
              &lt;p:commandButton value="Zuordnen" id="nzAllTableOrdeZuButton" ajax="true" partialSubmit="true"
                  process="@this" label="ToDo einem Mitarbeiter zuordnen" oncomplete="zuordnenDialogW.show();"
                  disabled="#{not nichtZugTableController.hasSelectedNZTodos}"
                  action="#{nichtZugTableController.doToDoArrayToList()}" style="float: left;" /&gt;
              &lt;pe:tooltip for="nzAllTableOrdeZuButton" value="Ausgwählte ToDos einem Benutzer zuweisen"
                  myPosition="left center" atPosition="right center" showEffect="fadeIn" hideEffect="fadeOut"
                  showDelay="700" /&gt;
              &lt;h:outputText value="#{nichtZugTableController.tableHeaderName}"
                  style="color:#cf0008; font-size: 22px;" /&gt;
          &lt;/f:facet&gt; 
  
          ...
  
  &lt;/p:dataTable&gt;
  </code></pre>
  
  <p>Here is my dialog:</p>
  
  <pre><code>&lt;body&gt;
  &lt;ui:composition&gt;
      &lt;h:form id="zuordnenDialogForm"&gt;
          &lt;p:dialog id="zuordnenDialog" widgetVar="zuordnenDialogW" closeOnEscape="true" dynamic="true"
              header="Zuordnung" appendToBody="false" draggable="true" modal="true" resizable="false"&gt;
              &lt;p:ajax event="close"  listener="#{zuordnenDialogController.closeDialog()}" /&gt;
  
               ...
  
          &lt;/p:dialog&gt;
  </code></pre>
  
  <p><strong>EDIT 1:</strong></p>
  
  <p>Here is a picture, maybe it helps</p>
  
  <p><a href="http://i.stack.imgur.com/pGjes.jpg" rel="nofollow">http://i.stack.imgur.com/pGjes.jpg</a></p>