title: primefaces partially submit datatable
body: <p>I needed to create a datatable with the functionality described here <a href="https://stackoverflow.com/questions/3409053/jsf2-can-i-add-jsf-components-dynamically">How to dynamically add JSF components</a></p>
  
  <p>It works, but in my form, besides this datatable I have other elements. I needed that when the add button is clicked, only the data entered in the datatable is submitted besides creating the new field. But the values to contact.email are always null. I'm trying to use primefaces commandbutton. </p>
  
  <pre><code>&lt;h:form&gt;
  //other elements
   &lt;h:panelGrid id="region" columns="1"&gt;
    &lt;p:commandButton action="#{myBean.addContact}" update="region"  value="add" immediate="true" process="region @this" ajax="true"/&gt;
      &lt;h:dataTable id="addContacts" value="#{myBean.contacts}" var="contact"&gt;
      &lt;h:column&gt;
          &lt;p:inputText id="email" value="#{contact.email}" /&gt;
      &lt;/h:column&gt;
  &lt;/h:dataTable&gt;
  &lt;/h:panelGrid&gt;
  &lt;/h:form&gt;
  </code></pre>
  
  <p>How can I make this partial submit work?</p>
  
  <p>Thanks</p>