Salesforce Certified Platform Developer II — Question 62
Choose the correct definition for <apex:actionFunction>.
Answer options
- A. Allows for controller methods to be called directly from Javascript. Must be encapsulated in <apex:form> tags. Unlike actionSupport, these function<apex:actionPoller>s can be called directly from Javascript code
- B. Sends an AJAX request according to the time interval you specify. If this ever gets re-rendered, it resets
- C. Adds AJAX support to another component (e.g. onClick, onMouseUp, onFocus, etc.)
- D. Can be associated with an AJAX request (actionFunction/actionSupport/actionPoller) and shows content conditionally depending on the status of the request (in progress/complete). Use the "id" field to specify name; use "status" field on related components to connect them
- E. Signifies which components should be processed by the server when an AJAX request is generated
Correct answer: A
Explanation
<apex:actionFunction> allows for the execution of controller methods directly from Javascript, which is why option A is correct. The other options describe different functionalities related to AJAX handling in Visualforce but do not accurately define <apex:actionFunction>.