I've this code:
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.org/ui" >
<h:form>
<h1 class="page-header "> <i class="fa fa-tachometer"></i> Dashboard</h1>
<p:outputPanel id="contentPanel">
<p:commandButton value="Añadir caso de prueba" actionListener="#{testCaseBean.prepareCreateTestCase}" oncomplete="PF('addTestCaseDialog').show();" process="@this" update=":dialog"/>
<p:dataTable>
</p:dataTable>
</p:outputPanel>
</h:form>
<p:dialog header="Crear caso de prueba" modal="true" id="dialog" widgetVar="addTestCaseDialog" closable="false">
<h:form id="addTestCaseDialogForm">
<p:panelGrid columns="4" styleClass="ui-noborder">
<p:outputLabel for="testCaseName" value="Nombre del caso de prueba:"/>
<p:inputText id="testCaseName" value="#{testCaseBean.testCase.testCaseName}" required="true"/>
<p:outputLabel for="assignedTask" value="Tarea relacionada:"/>
<p:inputText id="assignedTask" value="#{testCaseBean.testCase.assignedTask}" required="true"/>
<p:outputLabel for="isRegressive" value="Regresivo:" />
<p:selectBooleanCheckbox id="isRegressive" value="#{testCaseBean.testCase.isRegressive}"/>
</p:panelGrid>
<p:commandButton value="Guardar" actionListener="#{testCaseBean.createTestCase}" oncomplete="PF('addTestCaseDialog').hide()" process="addTestCaseDialogForm"/>
<p:commandButton value="Cancelar" onclick="PF('addTestCaseDialog').hide()" immediate="true" />
</h:form>
</p:dialog>
And I'm having a problem: the actionListener method from the dialog commandButton is not being called and I don't know why. If put this in then commandButton:
<p:commandButton value="Guardar" actionListener="# {testCaseBean.createTestCase}" oncomplete="PF('addTestCaseDialog').hide()" process="@this"/>
The method is called, but the form is not processed.
Any help?
Thanks!