Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.

Unlimited Access

Get Unlimited Contributor Access to the all ExamTopics Exams!
Take advantage of PDF Files for 1000+ Exams along with community discussions and pass IT Certification Exams Easily.

Exam Certified Platform Developer II topic 1 question 146 discussion

Actual exam question from Salesforce's Certified Platform Developer II
Question #: 146
Topic #: 1
[All Certified Platform Developer II Questions]

Choose the correct definition for <apex:messages>.

  • 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
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Soliton321
Highly Voted 3 years, 3 months ago
D is correct
upvoted 6 times
...
DJShetty
Most Recent 1 year, 2 months ago
Selected Answer: D
The question is about <apex:messages> not <apex:pageMessages>. Former component isn't formatted, whereas the latter is formatted using salesforce default styling. apex:pageMessages is the component where you can add multiple messages and it shows all the errors with formatting i.e. It displays all the messages that were generated for all components on the current page with formatting. apex:pageMessage is used to display single message i.e. it shows the specified message with formatting. apex:messages is similar to apex:pageMessages i.e. it shows all of the errors but with no formatting i.e. All messages that were generated for all components on the current page will be displayed without formatting. apex:message shows only the error for the specified field i.e. it is used to display message for a specific component.
upvoted 1 times
...
singhkar
2 years, 10 months ago
A is the correct ans
upvoted 1 times
singhkar
2 years, 10 months ago
B is the correct ans ..please ignore previous comment Below in the reference https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_messages.htm
upvoted 1 times
drwebber
2 years, 4 months ago
The answer is D All messages that were generated for all components on the current page. If an <apex:message> or <apex:messages> component is not included in a page, most warning and error messages are only shown in the debug log.
upvoted 1 times
...
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...