Ajax behaviors, such as partial page updates, are asynchronous events that occur in the background while a page user continues to work. For good usability, designers often add a status element to alert the user of any background activity currently in progress.
Visualforce supports status updates with the <apex:actionStatus> tag. This tag allows you to display text at the beginning or end of a background event with the startText or stopText attributes, or, for more advanced developers, allows you to display an image or other component.
For this example, we'll add status text to the contact list page that we have been developing. After a user clicks the name of a contact, the detail area displays the text, “Requesting...” while the detail area is rendered.
To implement the message, wrap <apex:actionStatus> around the <apex:detail> component, since that is the component being updated asynchronously. In between the two tags, add an <apex:facet> tag named “stop”.
In the following example, <apex:actionStatus> supports a facet named “stop” that contains the component that should be displayed as soon as the action completes—in this case, the detail area:
<apex:page standardController="Account"> <apex:pageBlock title="Hello {!$User.FirstName}!"> You are displaying contacts from the {!account.name} account. Click a contact's name to view his or her details. </apex:pageBlock> <apex:pageBlock title="Contacts"> <apex:form> <apex:dataTable value="{!account.Contacts}" var="contact" cellPadding="4" border="1"> <apex:column> <apex:commandLink rerender="detail"> {!contact.Name} <apex:param name="cid" value="{!contact.id}"/> </apex:commandLink> </apex:column> </apex:dataTable> </apex:form> </apex:pageBlock> <apex:outputPanel id="detail"> <apex:actionStatus startText="Requesting..."> <apex:facet name="stop"> <apex:detail subject="{!$CurrentPage.parameters.cid}" relatedList="false" title="false"/> </apex:facet> </apex:actionStatus> </apex:outputPanel> </apex:page>
https://Salesforce_instance/apex/ajaxAsyncStatus?id=001x000xxx3Jsxb