Reputation: 9943
I am using PrimeFaces p:messages but I think this question applies equally to h:messages
I have a composite component to handle login/logout at the top of every page. (It is in the Facelets template.) To handle login errors, it has a p:messages component in it.
In the content area, I typically have a form that also has a p:messages in it. However if the form processing ever produces a message, I end up getting a message rendered from the login component as well as the place where I intended.
This is hardly a fatal problem, but I would like to clean this up. Any suggestions?
Upvotes: 4
Views: 4836
Reputation: 30025
Primefaces p:messages
has an attribute redisplay
. Set
redisplay="false"
to instruct the message tag to only display messages that are not yet displayed on the page.
Upvotes: 9