Activity Forums Salesforce® Discussions What is Visualforce page problem in Salesforce?

  • Piyush

    Member
    September 23, 2019 at 11:54 am

    Hi,

    You can take help from this example :-

    <apex:page controller="Abc">
        <apex:form id="form">
            <apex:actionFunction name="loadPageContent" action="{!THREESeconds}" status="loading" reRender="form" />
        </apex:form>
        <apex:actionStatus id="loading">
            <apex:facet name="start">
                <img src="/img/loading32.gif" style="vertical-align: middle; padding-right: 1em" />
                Loading...
            </apex:facet>
        </apex:actionStatus>
        <script>
            loadPageContent();
        </script>
    </apex:page>
    public class Abc {
        public void THREESeconds() {
            Long startTime = DateTime.now().getTime();
            while(DateTime.now().getTime()-startTime<3000);
        }
    }

     

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos