この問題を解決する方法、私はプライムフェイスで確認ダイアログとレイアウトユニットを使用しています。appendToBody を使用しましたが、正しく動作しません。レイアウトユニットを使用しなかった場合、正しく動作します。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>
これは私のconfirmDialogです:
<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>