You need to sign in to do that
Don't have an account?
kjpeterson
Messages component doesn't identify message severity?
Is there some way I can use ApexPages.addMessage and have the apex:messages component render messages with some kind of severity indicator?
Yes, you can do that and the messages tag will show the message along with the severity.
Add the below line to your controller.
ApexPages.addMessage(new ApexPages.Message(ApexPages.severity.error, your message here)).
Then rerender the apex:messages tag using its id(ex: msg).
<apex:messages id="msg"/>
There are different values for the severity like
Info
Error
Confirm
Warning
Fatal
When using the messages component all that is rendered is an unordered list with none of the li's having any specials classes or icons to identify severity.
Here is an example:
Imran did I miss something in your reply? I am not seeing any kind of indication as to what the severity is when using the messages (plural) component.
Can you confirm?