Choose the correct definition for <apex:pageMessage>.
A. Standard Salesforce formatting, throws a specific message on a page
B. Standard Salesforce formatting, shows all errors that occur on page. Can add more messages through the "ApexPages.addMessage" function
C. A single message, without formatting, that can be associated with a specific component on the page
D. No formatting; displays all errors on a page
Ans:A
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_pageMessage.htm
C is the answer
A message for a specific component, such as a warning or error. If an or component is not included in a page, most warning and error messages are only shown in the debug log.
This is the definition for , not for .
Reference: https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_messages.htm?search_text=apex:pageMassages
@Praveen: Didn’t take my reply correctly. Hope this time it will work. 😉
The definition you are writing, is the definition for apex:messages and not for apex:pageMassage, which is required here.
Take a look at these references:
– Reference for apex:messages: https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_messages.htm?search_text=apex:pageMassages
– Reference for apex:pageMessage: https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_pageMessage.htm