Action as JavaScript Event
To invoke an action on the controller as a result of a JavaScript event, use the actionSupport
component. This component fires an action whenever the event is detected on the enclosing Visualforce component.
The actionSupport
component is placed within the body of a Visualforce component that fires the JavaScript event of interest. For example, an inputField
component renders an HTML input element, so it fires standard JavaScript events such as onfocus
, onblur
, onclick
, and so forth. Placing an actionSupport
component within the inputField
component allows it to listen for one of these events and invoke a controller method in response.
To use actionSupport
, specify the name of the controller method to invoke in its ...
Get Development with the Force.com Platform: Building Business Applications in the Cloud, Third Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.