2 Replies Latest reply on Aug 27, 2008 8:56 PM by Scott Basinger

    Automatically Update Page After Loading Complete

    Scott Basinger Newbie
      I have a Dashboard type page that gets data from several different external sources.  Some of the calls to get data may take a bit of time to complete.  What I'd like to do is show that dashboard page with the table headings, and display the spinner.gif while calls are made in the background to go get data.  I can do this manually by adding a4j:support with onchange event.  Is there a recommended way to go about this?

      <ui:define name="body">
        <script type="text/javascript">
          window.onload = function()
             page1:myGuestSalesLoadData = "true";

      <rich:panel id="MyGuestSalesPanel" header="My Guest Sales">
        <h:inputText id="myGuestSalesLoadData">
          <a4j:support event="onchange"
            reRender="personalSalesList" limitToList="true"  />
          <f:facet name="start">
            <h:graphicImage value="/img/spinner.gif" />
        <rich:dataTable  id="personalSalesList" var="_salesBean"
            <f:facet name="header">
              <h:outputText value="Sales Month" />
            <h:outputText value="#{_salesBean.salesDate}">
              <f:convertDateTime type="date" pattern="MMM yyyy"/>
            <f:facet name="header">
              <h:outputText value="Month To Date" />
            <h:outputText value="#{_salesBean.periodSales}" />