Preparing Practice Exam…
Please wait a moment while the system generates the exam questions, answers, and study session.
Please wait a moment while the system generates the exam questions, answers, and study session.
Question 25 of 83
Free Preview · 83 of 275 · questions 1–83 of 275 are free. Sign up free to sync your progress across devices.
Select one answer.
Written by other learners. Comments can disagree with the marked answer — check the official documentation when in doubt.
The <apex:pageMessages /> component is used to display all messages that have been added to the page using ApexPages.addMessage(). It is a common way to render messages on a Visualforce page.
Correct answer is D. We should add <apex:pageMessages /> component to the Visualforce page to display the message. This component collects and displays all messages with appropriate styling based on their severity (info, warning, error, etc.).
it is D because you can only use ApexPages.addMessage() to add to <apex:pageMessages/> C is only single message render the markup value, you cant run addMessage to add more message to it