当从commandbutton调用Primefaces对话框时,它不工作

当从commandbutton调用Primefaces对话框时,它不工作,primefaces,primefaces-dialog-framework,Primefaces,Primefaces Dialog Framework,我正在将primefaces版本4.0.RC1迁移到6.2,但是对话框不再工作。我通过命令按钮调用对话框 下面是我的标签 <ui:composition xmlns="http://www.w3.org/1999/xhtml" ... <ui:define name="corpo-da-pagina">... <h:form id="form" preprendId="false"> ... <p:commandButton value="Adicionar"

我正在将primefaces版本4.0.RC1迁移到6.2,但是对话框不再工作。我通过命令按钮调用对话框

下面是我的标签

<ui:composition xmlns="http://www.w3.org/1999/xhtml" ...
<ui:define name="corpo-da-pagina">...
<h:form id="form" preprendId="false"> ...
<p:commandButton value="Adicionar" actionListener="#{EnPaisSB.prepararAdicionar}" style="font-size: 10px" oncomplete="PF('man').show();" update="tabela" />...
<p:dialog modal="true" header="Manutencao"  widgetVar="man" resizable="true" width="500" id="dialog" closable="false" appendToBody="true"> ...

我发现了问题,这是我的模板。由于它是一个遗留应用程序,“MenuPrincipal.xhtml”模板非常混乱。我为测试创建了一个template.xhtml和composition.xhtml,并使用commandButton调用了该对话框,它成功了。

对话框框架如何,在我看来像一个普通对话框。。。请阅读对话框的文档。。。题外话:可能与See#16重复我创建了一个测试按钮(),它会在浏览器控制台(statusDialog未定义)中导致同样的错误,也会读取,并始终创建一个我创建了一个简单的屏幕,带有调用p:对话框的p:commandButton,它工作正常。我相信发生错误是因为我的页面是由模板组成的。有没有人用命令按钮调用过作文中的对话?很好,你找到了,谢谢你让我们知道。但是老实说,这个问题和答案对于其他人来说是没有用的。您最好删除它们,或者同时大大改进它们。干杯
ReferenceError: statusDialog is not defined[Learn More] TblEnPais.xhtml:139:76
start http://localhost:8080/Enderecamento-web/cadastro/TblEnPais.xhtml:139
trigger http://localhost:8080/Enderecamento-web/javax.faces.resource/core.js.xhtml?ln=primefaces&v=6.2:6
bind http://localhost:8080/Enderecamento-web/javax.faces.resource/core.js.xhtml?ln=primefaces&v=6.2:6
jQuery 7
send http://localhost:8080/Enderecamento-web/javax.faces.resource/core.js.xhtml?ln=primefaces&v=6.2:3
offer http://localhost:8080/Enderecamento-web/javax.faces.resource/core.js.xhtml?ln=primefaces&v=6.2:3
handle http://localhost:8080/Enderecamento-web/javax.faces.resource/core.js.xhtml?ln=primefaces&v=6.2:3
ab http://localhost:8080/Enderecamento-web/javax.faces.resource/core.js.xhtml?ln=primefaces&v=6.2:3
onclick http://localhost:8080/Enderecamento-web/cadastro/TblEnPais.xhtml:1