Uncaught Referenceerror when trying to open a dialog of the first faces

Asked

Viewed 5 times

0

I am having problems trying to open a dialog, in the browser console is returned the following error:

Uncaught ReferenceError: baixarArquivoRemessa is not defined
at <anonymous>:1:1
at p (<anonymous>:2:523)
at Function.globalEval (<anonymous>:2:2581)
at Object.doEval (core.js?ln=primefaces&v=6.2:3)
at Object.handle (core.js?ln=primefaces&v=6.2:3)
at Object.<anonymous> (core.js?ln=primefaces&v=6.2:3)
at i (<anonymous>:2:28017)
at Object.fireWith [as resolveWith] (<anonymous>:2:28783)
at A (<anonymous>:4:14035)
at XMLHttpRequest.<anonymous> (<anonymous>:4:16323)

The error appears when clicking on an item of a <p:Tree>, defined as follows:

<p:tree id="listagemArvoreRemessas" dynamic="true"
                value="#{anexosPCABean.rootRemessa}" var="nodeRemessa"
                style="border-width:0; width:100%;" selectionMode="single"
                selection="#{anexosPCABean.selectedNodeRemessa}">

                <p:treeNode type="LEAF" icon="ui-icon-document"
                    styleClass="quebrarLinhaTree">

                    <div class="reticencias">

                        <h:outputText
                            value="#{remessaBean.getStringDoMesDaRemessa(nodeRemessa.numero)} - #{anexosPCABean.nomeArquivo(nodeRemessa)}"
                            title="#{remessaBean.getStringDoMesDaRemessa(nodeRemessa.numero)} - #{nodeRemessa.toString()}" />

                    </div>

                </p:treeNode>

                <p:ajax event="select"
                    listener="#{anexosPCABean.onNodeSelectRemessa}" 
                    oncomplete="PF('baixarArquivoRemessa').show()"
                    update=":form_geral_interno:dialogBaixarArquivoRemessa :form_geral_interno:panel_arquivos_remessa"/>

            </p:tree>

And the dialog in question is as follows:

<p:dialog id="dialogBaixarArquivoRemessa"
widgetVar="baixarArquivoRemessa" modal="true" 
header="Download de Arquivo" closeOnEscape="true">

<p:panelGrid styleClass="panelGridSemBorda">

    <p:row>
        <p:column>
            <p:spacer height="0" />
        </p:column>
    </p:row>

    <p:row>
        <p:column>
            <h:outputLabel id="label_titulo_id"
                value="Deseja baixar o arquivo da remessa do mês #{anexosPCABean.remessaDownload.numero}/#{anexosPCABean.remessaDownload.ano} ?" />
        </p:column>
    </p:row>

    <p:row>
        <p:column>
            <p:spacer height="0" />
        </p:column>
    </p:row>

    <f:facet name="footer">

        <p:row>
            <p:column>
                <center>

                    <p:commandButton id="botaoCancelar_id" value="Cancelar"
                        onclick="PF('baixarArquivoRemessa').hide()" update="" />

                    <p:commandButton id="botaoBaixar_id" value="Baixar Arquivo"
                        ajax="false" onclick="PF('baixarArquivoRemessa').hide()"
                        update=":dialogBaixarArquivoRemessa">

                        <p:fileDownload
                            value="#{anexosPCABean.getStreamedContentBaixarArquivoRemessa()}" />

                    </p:commandButton>

                </center>
            </p:column>
        </p:row>

    </f:facet>

</p:panelGrid>

</p:dialog> I’ve been trying to figure out the problem for a while, I hope someone can help me, since I appreciate any help, I’m using the primefaces 6.2.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.