Provide Status for Asynchronous Operations
Ajax behaviors, such as partial page updates, are asynchronous events that occur in the background while a user continues to work. With the <apex:actionStatus> component, you can display status messages that alert the user of any background activity currently in progress.
The <apex:actionStatus> component displays a status message at the beginning or end of a background event with the startText or stopText attributes. It can also display an image or other component.
The example Visualforce page shows a list of an account’s contacts. After a user clicks a contact’s name, the detail area displays the status message “Requesting…” until the contact’s details render.
The <apex:actionStatus> component’s startText attribute is set to the text displayed at the start of the Ajax request.
The id attribute allows other components to reference the <apex:actionStatus> component. Because the <apex:commandLink> component initiates the Ajax request, its status attribute is set to the <apex:actionStatus> component’s id.
<apex:actionStatus> supports the <apex:facet> component. The <apex:facet> component’s name attribute is set to stop, which indicates that the status message displays until the component nested inside the facet component renders. In this example, that component is <apex:detail>, which shows the chosen contact’s details.
When you visit this page, include an account id as part of the URL, for example https://MyDomainName--c.vf.force.com/apex/ajaxAsyncStatus?id=001x000xxx3Jsxb.
See Also