問題文
A veterinary practice embeds a third-party drawing widget in a Visualforce page. When the vet finishes a sketch, the widget's JavaScript callback must hand the image to a controller method and get a saved record back. Which approach meets it?
選択肢
- Call the controller method straight from JavaScript with the class name and the method name, because a page's controller methods are exposed to the browser automatically once the page is saved.
- Declare an actionFunction inside the page's form and call the JavaScript name it generates from the widget's callback.
- Put an actionPoller on the page and let the widget write the image into a hidden input it submits.
- Declare an actionSupport on the form and call it by name from the widget's callback, because that component is the one that exposes a method to JavaScript.