with the property ajax="true" the dialog closes but the action method is never called, with ajax="false" nothing happens at all.
I've tried to test it in firebug but i never used it and i wasn't able to find if the ajax event fired =|
my code
Code: Select all
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.prime.com.tr/ui"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core">
<ui:composition template="Template.xhtml">
<h:form prependId="false">
<div align="center">
Buscar Projeto
<br/>
<br/>
<h:panelGrid columns="3">
<h:outputLabel value="Buscar: "/>
<h:selectOneMenu id="projeto" value="#{projetoBean.projeto_selecionado}" required="true" requiredMessage="Selecione um Projeto!">
<f:selectItems value="#{projetoBean.lista_projetos}"/>
</h:selectOneMenu>
<p:commandButton ajax="false" value="Buscar" action="#{projetoBean.buscar_Projeto}" update="growl"/>
</h:panelGrid>
</div>
</h:form>
<h:form prependId="false">
<div >
<h:panelGrid id="grid" columns="3">
<h:outputText value="Nome do Projeto: " />
<h:inputText id="nome" required="true" requiredMessage="Digite o nome do Projeto!" maxlength="45" value="#{projetoBean.nome}"/>
<h:outputText style="color: red" value="*"/>
<h:outputText value="Descrição: "/>
<h:inputText id="descricao" maxlength="200" value="#{projetoBean.descricao}"/>
<h:outputText value=""/>
<h:outputText value="Data de Início: "/>
<p:calendar id="data_de_inicio" readOnlyInputText="true" pattern="dd/MM/yyyy" required="true" requiredMessage="Selecione a data de início!" effect="explode" locale="pt_BR" showButtonPanel="true" value="#{projetoBean.data_de_inicio}"/>
<h:outputText style="color: red" value="*"/>
<h:outputText value="Data de Término: "/>
<p:calendar id="data_de_termino" readOnlyInputText="true" pattern="dd/MM/yyyy" locale="pt_BR" effect="explode" showButtonPanel="true" value="#{projetoBean.data_de_termino}"/>
<h:outputText value=""/>
</h:panelGrid>
<br/>
<p:commandButton value="Salvar" onclick="confirmacao.show()"/>
<p:confirmDialog message="Tem certeza que deseja modificar esse projeto?" header="Salvar" severity="warn" widgetVar="confirmacao" position="center">
<p:commandButton ajax="true" value="Sim" update="growl" action="#{projetoBean.editarProjeto}" oncomplete="confirmacao.hide()" type="submit" />
<p:commandButton value="Não" onclick="confirmacao.hide()" type="button" />
</p:confirmDialog>
<br/>
</div>
</h:form>
<p:growl id="growl" showDetail="true" />
</ui:composition>
</html>
using the same p:commandbutton with ajax set to false outside the dialog works fine.
Thanks for the help =)