Java 确认对话框不存在';我不能和layoutUnit一起工作

Java 确认对话框不存在';我不能和layoutUnit一起工作,java,jsf,primefaces,Java,Jsf,Primefaces,如何解决这个问题,我正在使用带有primefaces的confimDialog和layoutunit。我用过附件,但不能正常工作。 当我没有正确使用布局单元时。 我想使用appendToBody和我的bean访问控制器。当我使用这个属性时,它不会访问我的bean 这是我的模板: <p:layoutUnit position="center" resizable="false" footer="© 2013 Nota Fiscal Eletrônica v. #{UsuarioLogadoC

如何解决这个问题,我正在使用带有primefaces的confimDialog和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>

您的确认对话框需要采用单独的形式。另外,你的EL表达式不正确

"#{NotaFiscalControl.incluir}"
默认情况下,EL表达式中引用的托管bean始终以小写字符开头,如下所示:

"#{notaFiscalControl.incluir}"

您是否明确将托管Bean命名为NotaFiscalControl为
@ManagedBean(name=“NotaFiscalControl”)
?如果不是,则必须从EL表达式中的小写字母开始

谢谢你的回复。是的,他工作了这么多,没有组件:布局单元素面你能解决它吗?你使用的是什么版本的Primefaces?您可以使用
global=“true”
使confirmDialog成为全局对话框。Primefaces 4.0支持它。你的对话在哪里?内部还是外部布局元素?我的对话框在子页面中