I needed to create a datatable with the functionality described here How to dynamically add JSF components
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.
<h:form>
//other elements
<h:panelGrid id="region" columns="1">
<p:commandButton action="#{myBean.addContact}" update="region" value="add" immediate="true" process="region @this" ajax="true"/>
<h:dataTable id="addContacts" value="#{myBean.contacts}" var="contact">
<h:column>
<p:inputText id="email" value="#{contact.email}" />
</h:column>
</h:dataTable>
</h:panelGrid>
</h:form>
How can I make this partial submit work?
Thanks