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

4

I have a page that has a table in the center, this table is refreshed every 30 seconds using the 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 populated. If the user is filling in this form and the update of the pool occurs, then everything the user entered is lost. >

Is there any way to not update in this mode?

I've tried to leave the mode out of the "center" but it did not work.

    
asked by anonymous 24.04.2014 / 17:40

1 answer

2

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

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

However, if attributes of the ManagedBean 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 to disable / enable poll when the user open and close the edit.

    
24.04.2014 / 21:31