Why does JSF not recognize the component id in View?

0

JSF is not recognizing the "dialog-analysis" id that is in the view and is giving the error:

FATAL: Cannot find component for expression "dialogo-analise" referenced from "frmAtividade:tab:itens-rh:0:j_idt275".javax.faces.FacesException: Cannot find component for expression "dialogo-analise" referenced from "frmAtividade:tab:itens-rh:0:j_idt275".

Code that I'm calling the

<p:commandLink title="Registrar Análise"
        oncomplete="PF('edicaoAnaliseRH').show()"
        action="#{atividadeBean.iniciarAnaliseRH(rh.id,rh.cpf)}"
        process="@this" update="dialogo-analise">
        <h:graphicImage value="/img/setas_2544_Run2.png" width="17"/>
</p:commandLink>

When I remove the id from the "dialog-analyze" dialog, it works but it does not do what I need. I'm using the tabview of the primefaces and the button is inside a datatable, in which I select a line. There is a method in my bean that I call before opening the dialog. I select some data in the table and try to display it in this dialog. Debugging the data is assigned to the attribute setters, but they are not displayed .... very strange.

Dialog Code

<p:dialog id="dialogo-analise" widgetVar="edicaoAnaliseRH" resizable="false" modal="true" closeOnEscape="true">
    
asked by anonymous 05.10.2015 / 14:50

1 answer

3

The problem is not that it recognizes the id but rather it is not finding the correct path of the id of dialog .

The correct path would be update=":frmAtividade:dialogo-analise" .

Some components need to do this, such as tabView , dataTable and dialog , when doing an update out of them it is necessary to put the path, starting with the form id, / p>

An alternative is to use update="#{p:component('idComponente')}"

    
05.10.2015 / 15:48