Sometimes an AJAX request takes some time. Because of the asynchronous of AJAX the user does not note that there is something happening on the server. So it is a nice thing to display the status of the request.

Using Richfaces/A4J you can use the tag to display such an message. An example may look like this:

...
<s:span styleClass="rich-text-general">
    <h:outputText value="State: "/>
    <a4j:status startText="request is processed, please wait..." stopText="processing finished."/>
</s:span>
...

Now, on any AJAX request on this site the tag is used. You can also use a modal panel, e.g.:

...
<a4j:status onstart="Richfaces.showModalPanel('ajaxLoadingModalBox',{width:250, top:100})" 
onstop="Richfaces.hideModalPanel('ajaxLoadingModalBox')"/>
...
<rich:modalPanel id="ajaxLoadingModalBox" minHeight="100" minWidth="250" height="100" width="250" zindex="2000">
    <f:facet name="header">
        <h:outputText value="Processing request"/>
     </f:facet>
         <h:outputText value="Request is processed, please wait..."/>
</rich:modalPanel>