You need to sign in to do that
Don't have an account?

ApexPages Message
Hi,
I' using page messages to display message on vf page.
I want to display message as show below...
How can i achieve that
Message:'You Selected'+' '+a.name
ApexPages.Message msg=new ApexPages.Message(ApexPages.Severity.Info,'You Selected'+' '+a.name );
ApexPages.addMessage(msg);
Shravan,
Use the apex pageMessages tag:
Regards,
Zach McElrath
Skoodat LLC
Hi,
I'm able to display message, but i want to change color as show below.
Inorder to style messages, you cannot use the pageMessages tag there won't be any attributes for "Style" in that tag. Your best
bet is using "<apex:messages>" tag in this salesforce stylesheets won't be enabled and you can style however u want
Try with the following
And in your apex
Regards
How come when I do the same thing. It says it only takes an Exception type
Compile Error: Argument must be an exception type
@Alanw707, be sure you use addMessage (singular) and not addMessages (plural) when using SeAiVa's code snippet. Easy typo to make.