I'm trying to prevent a user from double submitting a visualforce page using the action status as described in this article:


Here is the code in my VF page with the action status:

        <apex:pageBlockButtons location="both">
        <apex:actionStatus id="mySaveStatus2">
            <apex:facet name="stop">
                <apex:commandButton action="{!savesubmit}" value="Submit" rerender="dummy2"  />
                <apex:facet name="start">
                    <apex:commandButton value="Processing..." status="mySaveStatus2" disabled="true" />
        <apex:commandButton action="{!cancel}" value="Cancel"  />

The action status is not working and my VF page does not redirect to the next page upon clicking the save button.

Any help is appreciated. Thanks.

| improve this question | | | | |
  • 1
    Try adding a status="mySaveStatus2" to you command button – Eric Mar 13 '15 at 3:27
  • Added as answer then – Eric Mar 13 '15 at 14:08

Your command button is not using the status when it submits the request as you are missing the required parameter:

Try adding a status="mySaveStatus2" to you command button

| improve this answer | | | | |
<apex:page><apex:form id="formId">
    <apex:actionStatus id="status">
        <apex:facet name="start">
            <div style="position: fixed; top: 0; left: 0; right: 0; bottom: 0; opacity: 0.75; z-index: 1000; background-color: grey;">
            <div style="position: fixed; left: 0; top: 0; bottom: 0; right: 0; z-index: 1001; margin: 22% 42%">
                <img src="{!$Resource.loader_logo}" width="80" height="80" / >
    <apex:commandButton value="Insert Report" action="{!insertData}" >
        <apex:actionSupport event="onclick" status="status" reRender="formId" />
| improve this answer | | | | |
  • Please do not post a code dump. If this code helps answer the problem, explain what you are doing and why using an edit. – Adrian Larson Feb 14 '18 at 13:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.