nerdexam
Salesforce

PDII · Question #60

A developer is using a third-party JavaScript library to create a custom user interface in Visualforce. The developer needs to use JavaScript to get data from a controller method in response to a…

The correct answer is D. Use <apex:actionSupport> to enable JavaScript support for the controller method. See the full explanation below for the reasoning.

Question

A developer is using a third-party JavaScript library to create a custom user interface in Visualforce. The developer needs to use JavaScript to get data from a controller method in response to a user action. How can the developer accomplish this?

Options

  • AUse apex:actionFunction to create a JavaScript wrapper for the controller method
  • BUse the @RemoteAction annotation on the method definition with JavaScript Remoting
  • CUse the $Controller global variable to access the controller method via JavaScript
  • DUse apex:actionSupport to enable JavaScript support for the controller method

How the community answered

(55 responses)
  • A
    5% (3)
  • B
    11% (6)
  • C
    2% (1)
  • D
    82% (45)

Community Discussion

No community discussion yet for this question.

Full PDII Practice