I have created a custom Validator, and it works with the usual p:message
. But I would use this validator for more than one field of the same type (integer) and show the message in a growl or in a messages. But I noticed that this message is hided almost instantly in both growls and messages.
This is my growl (in the template):
<p:growl id="msgs" autoUpdate="true" showDetail="true" />
This is the messages (in the specific page):
<p:messages id="messages" autoUpdate="true" closable="true" showDetail="true" />
What's wrong? Normally, with addMessage
, the template growl works. I tried also to do an addMessage
in the validate()
method of the Validator, but now two messages disappears!
I also tried to add sticky="true"
to the growl, but nothing.
I'm tempted to add all p:message
to the top of the page and remove the others with JS...
I'm using Primefaces 3.4.1 with Mojarra 2.1.7