Error while trying to update a Primefaces dialog

Asked

Viewed 337 times

2

I have a button that sits inside a column in a datatable, this button opens a dialog which contains a table with some data. But when I try to give a update=":frmPrin:dialogParecer" the following error on the page:

Cannot find Component for Expression ":frmPrin:parecer" referenced from "frmPrin:j_idt30:reimbursementTable:0:j_idt52".

This one of mine dataTable is inside a tabView. And when I leave the update=":frmPrin" works, but updates the entire form. How can I update only the dialog?

1 answer

3


Check the name you put in the update, because the message says that you did not find :frmPrin:parecer and according to your post the correct would be update=":frmPrin:dialogParecer", I am missing the dialog before Opinion.

I thought the problem had been solved but when I entered today system started error again, I was making the following way: update="frmPrin:j_idt30:opinion adding this j_idt30 that I saw in browser developer mode, but today that id has changed, or be it keeps changing. What can this be?

This j_idt30 is a dynamic id, so the ideal is for you to update the id you named for the component, maybe if you put the page code it is easier to analyze the error.

  • I checked and the name is correct

  • Keeps returning the same error message?

  • Yes, I kind of got around the problem using a <p:remoteCommand> that does the update and then I call it when opening the dialog

  • Well, I don’t know how you got your code, but if it fits your problem, that’s all that matters. Anything puts the code so we can analyze it more accurately.

  • Got it, thanks for trying to help. I’ll post how I solved the problem in a little while.

  • I thought the problem had been solved but when I entered today the system started the error again, I was doing it as follows: update="frmPrin:j_idt30:parecer adding this j_idt30 which I saw in browser developer mode, but today this id has already changed, that is to say it keeps changing. What can be this?

  • This j_idt30 is a dynamic id, so the ideal is for you to update the id you named for the component, maybe if you put the page code it is easier to analyze the error.

  • That’s what was missing anyway, I missed putting an ID on tabView. Thanks for the help, edit your question with this last comment so you can help more people

Show 3 more comments

Browser other questions tagged

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