How to make the p:Poll component not interfere with the modal in Primefaces 3.5

Asked

Viewed 232 times

4

I have a page that has a table in the center, this table is updated every 30 seconds using the component p:poll

<p:poll interval="30" update=":centro" />

The problem is that I have a menu that opens a popup (modal) with a form to be filled in. If the user is filling out this form and the pool update occurs, then everything the user typed is lost.

Is there any way to not update this modal?

I tried to leave the modal outside the "center" but it didn’t work.

1 answer

2

This is an expected behavior, since the updated element’s HTML code and its children is replaced by a new one in the event update.

If the modal was out of center it should not have been closed. You tried to use the attribute appendTo="@body"?

However, if Managedbean attributes are changed that the modal form uses, it will be out of sync with the backend.

The only easy solution I see for this scenario would be disable/enable Poll when the user opened and closed the edition.

Browser other questions tagged

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