<apex: actionSupport> Component in Visualforce PageThe <apex:actionSupport> component is another important component that's used for adding AJAX support to another component. It allows the component to be refreshed asynchronously by the server when a particular event occurs. Just like other components, the <apex:actionSupport> component also has the following attributes: 1. actionThe action attribute is of type "ApexPages.Action" that is used for defining the action method invoked by the AJAX request to the server. The page simply refreshes when the user does not specify the action. Syntax 2. disabledThe disabled attribute is of type Boolean, which specifies whether the component is disabled or not. The defined action is not invoked when its value is set to true. Syntax 3. disableDefaultThe disableDefault attribute is of type Boolean, which specifies whether the default browser processing should be skipped for the associated event or not. By default, its value is set to true. Syntax 4. eventThe event attribute is of type String used to define the DOM event used for generating AJAX requests. Onclick, ondbclick, onkeyup, etc., are the possible values for this attribute. Syntax 5. focusThe event attribute is of type String that is used for defining the id of that component which is in focus after completion of the AJAX request. Syntax 6. idThe event attribute is of type String that is used for defining an identifier. It allows the component to be referenced by another component on the page. Syntax 7. immediateThe immediate attribute is of type Boolean. If its value is true, the action associated with the component will happen immediately. The validation rules associated with the fields on the page will not be processed by the function. Syntax 8. oncompleteString type attribute that defines the JavaScript method invoked when the result of an AJAX update request completes on the client. Syntax 9. onbeforedomupdateAnother string type attribute that defines the JavaScript method that is invoked when the onbeforedomupdate event occurs. Syntax 10. onsubmitThe onsubmit attribute is of type string that is used for specifying the JavaScript method before sending an AJAX update request to the server. Syntax 11. timeoutThe timeout attribute is of type Integer that defines the amount of time before an AJAX update request should time out. Syntax 12. statusThe status attribute is of type string that defines the Id of an associated component that displays the status of an AJAX update request. Syntax 13. reRenderThe reRender attribute is of type Object that is basically Id of one or more components which we need to redraw when the client receives the result of the action method. Its value can be a single Id, comma-separated Id, or collection of Ids. Syntax 14. renderedA Boolean attribute is used to specify whether the component is rendered on the page or not. By default, its value is set to true. Syntax Let's take an example to understand how we can use the <apex:actionSupport> component in VF: ApexActionSupportExample.vfp ApexActionSupportController.apxc Output Next Topic |