I'm using PrimeFaces p:growl.
<p:growl id="msgsInfo"
rendered="true"
showDetail="true" />
<p:growl id="msgsError"
globalOnly="true"
showDetail="true"
sticky="true" />
I need to show in the first growl only Info
messages while in the second I need to show Error
messages.
Using globalOnly
when I add error message this is show 2 times.
Any idea?
It would in theory be possible if it supported infoClass
, errorClass
, etc attributes like as h:messages
. You could then just specify a CSS class which does a display: none
.
But the p:growl
doesn't support those attributes. On the severity level all you can do is changing the icon by infoIcon
, errorIcon
, etc. So you're pretty lost here.
It might be worth a feature request.
Note that the globalOnly="true"
only displays messages which have a null
client ID, regardless of their severity.
Please see my answer
PrimeFaces growl change color dynamically (Multiple messages)
You can also find the source code of the project which produces the page below:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With