0
JSF is not recognizing the "dialogo-analyze" 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 I am called 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 "dialogue-analysis" dialog id, it works but does not do what I need. I am using the tabview of the first faces 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 in this dialog. Debugging the data is assigned to attribute setters, but they are not displayed.... very strange.
Dialogue code
<p:dialog id="dialogo-analise" widgetVar="edicaoAnaliseRH" resizable="false" modal="true" closeOnEscape="true">
This problem is happening in the update?
– DiegoAugusto
Yes, when I include the dialog id, it gives the error that the component does not exist
– Marcelo Gomes
The problem is not that it recognizes the id, it is not finding the id. They are within the same form?
– Rafael
Yes, they’re in the same form.
– Marcelo Gomes
Has something to do with tabview?
– Marcelo Gomes
Post your code to see how you rank your page.
– Rafael
Probably this is the component that is missing the ID:
j_idt275
– DiegoAugusto
Do a test like this:
update="j_idt275:dialogo-analise"
– DiegoAugusto
j_idt275 is probably his commandLink, you need to see where his dialog is to put the correct path in the commandLink update
– Rafael
If it’s outside tabview it’s probably
update=":frmAtividade:dialogo-analise"
– Rafael
Rafael, it worked the way you described it. I put the dialog outside the tabview.... now I have another problem. When I finished updating this screen I was updating a datatable that was inside a tab. Now does not update anymore because I took the dialog tab. For me to update this datatable I need to inform all the way of this id, for example: frmAtivity:tabview:tab:datatable?
– Marcelo Gomes
Yes, or you can update the entire tabview (if necessary). I will post an answer with the solution.
– Rafael
Rafael, blz.... Thanks so much for your help! Hugs
– Marcelo Gomes