PrimeFaces 2.x / 3.x
This is not possible initially, so a trick is needed. In the rendered <p:messages> attribute, check if <p:poll> was run, and if so, return false . Thus, the JSF does not consider that the component tree does not have a component of automatically updated messages during rendering, so it will ignore it.
If <p:poll> fires, its client identifier is displayed as the javax.faces.source request parameter. So this should do:
<p:messages ... rendered="#{param['javax.faces.source'] ne poll.clientId}" /> ... <p:poll binding="#{poll}" ... />
(note: no additional bean properties are required)
PrimeFaces 4.x +
All components of the PrimeFaces team received a new ignoreAutoUpdate attribute, which you could set to false to ignore all autoUpdate="true" components in the ajax update.
<p:poll ... ignoreAutoUpdate="true" />
source share