I use the tag h:messages for displaying form validation messages (in a red error style). I was wondering if you can use that tag to display other messages as well. For example a success message (obviously in another style) or an info message. So that I can integrate such a messages tag in any page and use it to provide information to the user.
Thank you for suggestions
Thank you for your answers.
But how does h:messages tag knows what styleClass is used for what severity ?
EDIT: Got it: infoStyle="color: green;" errorStyle="color: red;"
You can do that very easily. Just use the
infoStyleattribute and you can add a message like this: