component in Visualforce Page
This component should always be the child component of the <apex:form> because binding between the caller and the <apex:actionFunction> component is done based on parameter order. We have to ensure the order of the <apex:param> matches the caller's argument list.
The <apex:actionFunction> component has the following attributes:
The action attribute is of type string that defines the action method invoked when the <apex:actionFunction> is called by the DOM event elsewhere in the page markup.
The focus attribute is of type string that defines the id of the component that is in focus after the AJAX request completes.
The id attribute is of type string that is a unique identifier allowing the <apex:actionFunction> component to be referenced by other components on the page.
The immediate attribute is of type Boolean. If its value is true, the action associated with the component will happen immediately. The function will not process the validation rules associated with the fields on the page.
The timeout attribute is of type Integer that defines the amount of time before an AJAX update request should time out.
The status attribute is of type string that defines the Id of an associated component that displays the status of an AJAX update request.
The reRender attribute is of type Object that is 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 a collection of Ids.
A Boolean attribute is used to specify whether the component is rendered on the page or not. By default, its value is set to true.
Let's take an example to understand how we can use the apex actionFunction in the code: