I have been having some strange problems involving ajax and it is driving me nuts. Let me state right away that I am sure the problem is the way I am building my app. I am using Primefaces 2.0.0 on Glassfisfh v3. I have a p:dataList in a form with a p:dialog. The dialog pops up a form to create a new record which will add an entry into the dataList using ajax, and the dataList has a delete button on each row which will delete the row and refresh the dataList also using ajax. Here is basically how I have it configured:
Code: Select all
<h:form id="listForm">
<p:dialog>
<p:commandButton async="true" action="#{bean.persist}" update="listForm" />
</p:dialog>
<p:dataList id="listTable">
<p:column>
<p:commandButton ajax="true" process="listForm" action="#{entity.delete}" />
</p:column>
</p:dataList>
</h:form>
I have simplified the delete button - it is actually in a composite component. If I take ajax out, both the new and delete functions work correctly. If I enable ajax, however, both invoke ajax actions but the server side actions never get called. Is there something obviously wrong with this?