Visualforce: Integrating a loading animation the standard way

As Phil was trying to tell me, making a loading graphic show on a VF page is mega easy with the actionStatus visualforce component.

Here’s a sample:

  <apex:actionStatus id="status">
      <apex:facet name="start">
          Loading... <img src="/img/loading.gif" alt="Loading..."/>
      </apex:facet>
  </apex:actionStatus>
  <apex:commandButton action="{!doSomething}" value="Show me Loading!" rerender="someId" status="status" />

Try it out. MUCH simpler, thanks Phil!

This entry was tagged . Bookmark the permalink.