Salesforce
PDII · Question #18
A custom Visualforce controller calls the ApexPages.addMessage() method, but no messages are rendering on the page. Which component should be added to the Visualforce page to display the message?
The correct answer is D. <apex:pageMessages />. See the full explanation below for the reasoning.
Question
A custom Visualforce controller calls the ApexPages.addMessage() method, but no messages are rendering on the page. Which component should be added to the Visualforce page to display the message?
Options
- A<apex:message for="info"/>
- B<apex:facet name="messages" />
- C<apex:pageMessage severity="info" />
- D<apex:pageMessages />
How the community answered
(43 responses)- A7% (3)
- B2% (1)
- C12% (5)
- D79% (34)
Community Discussion
No community discussion yet for this question.