如何解决这个问题,我正在使用带有 primefaces 的 confimDialog 和 layoutunit。我使用了 appendToBody,但不能正常工作。当我没有使用 layoutunit 时可以正常工作。我想使用 appendToBody 和我的 bean 访问控制器。当我使用此属性时,它不会访问我的 bean
这是我的模板:
<p:layoutUnit position="center" resizable="false" footer="© 2013 Nota Fiscal Eletrônica v. #{UsuarioLogadoControl.versao }" >
<h:form id="formCorpo">
<p:messages autoUpdate="true" />
<p:growl autoUpdate="true" />
<div class="main">
<p:ajaxStatus onstart="statusDialog.show();" onsuccess="statusDialog.hide();" />
<p:dialog widgetVar="statusDialog" header="Aguarde..." draggable="false" closable="false" resizable="false" appendToBody="true" modal="true">
<p:graphicImage value="/images/ajaxloadingbar.gif" />
</p:dialog>
<ui:insert name="corpo" />
</div>
</h:form>
</p:layoutUnit>
这是我的确认对话框:
<p:confirmDialog id="dialogConfirmaNotaFiscal" widgetVar="confirmacao" message="A NOTA FISCAL não terá valor fiscal caso não seja confirmada após inclusão" header="Atenção ao Incluir" showEffect="bounce" hideEffect="explode" severity="alert">
<p:commandButton value="OK" update="msg" oncomplete="confirmation.hide()" action="#{NotaFiscalControl.incluir}" ajax="false" rendered="#{!NotaFiscalControl.substituicao}" />
<p:commandButton value="OK" update="msg" oncomplete="confirmation.hide()" action="#{NotaFiscalControl.substituir}" ajax="false" rendered="#{NotaFiscalControl.substituicao}" />
<p:commandButton value="CANCELAR" onclick="confirmacao.hide()" type="button" />
</p:confirmDialog>