exam questions

Exam Certified Platform Developer II All Questions

View all questions & answers for the Certified Platform Developer II exam

Exam Certified Platform Developer II topic 1 question 6 discussion

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

A Visualforce page contains an industry select list and displays a table of Accounts that have a matching value in their Industry field.
<apex:selectList value="{!selectedIndustry}">
<apex:selectOptions values="{!industries}"/>
</apex:selectList>
When a user changes the value in the industry select list, the table of Accounts should be automatically updated to show the Accounts associated with the selected industry.
What is the optimal way to implement this?

  • A. Add an <apex:actionFunction> within the <apex:selectOptions>.
  • B. Add an <apex:actionFunction> within the <apex:selectList>.
  • C. Add an <apex:actionSupport> within the <apex:selectList>.
  • D. Add an <apex:actionSupport> within the <apex:selectOptions>.
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Rocky_sfdc
Highly Voted 2 years, 9 months ago
C is correct
upvoted 16 times
...
ksar4u
Most Recent 4 days, 21 hours ago
Selected Answer: B
apex:actionFunction can invoke a JS function. apex:actionSupport is for a VF component.
upvoted 1 times
...
iValRV
5 months, 4 weeks ago
Selected Answer: C
C is correct
upvoted 1 times
...
iValRV
5 months, 4 weeks ago
C is correct
upvoted 1 times
...
Saranraj
9 months, 1 week ago
Selected Answer: C
C is correct
upvoted 1 times
...
levian
1 year ago
C is correct
upvoted 1 times
...
doggs119
1 year, 10 months ago
This is actually correct. A component that provides support for invoking controller action methods directly from JavaScript code using an AJAX request. An <apex:actionFunction> component must be a child of an <apex:form> component. Unlike <apex:actionSupport>, which only provides support for invoking controller action methods from other Visualforce components, <apex:actionFunction> defines a new JavaScript function which can then be called from within a block of JavaScript code. Also A component that adds AJAX support to another component, allowing the component to be refreshed asynchronously by the server when a particular event occurs, such as a button click or mouseover. Use this component to get user input for a controller method that does not correspond to a field on an sObject. Only <apex:inputfield> and apex:outfield can be used with sObject fields. In this instance, it does correspond to a sobject so B is correct
upvoted 3 times
...
NPW89
1 year, 11 months ago
apex:actionSupport A component that adds AJAX support to another component, allowing the component to be refreshed asynchronously by the server when a particular event occurs, such as a button click or mouseover.
upvoted 2 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 ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago