0

I'm trying to add an progress indicator on a custom "Save" commandButton on a Visualforce page. The method that the button calls returns a PageReference. Once I add in the actionStatus code, I get the status indicator, but the new page is never loaded. What might be going wrong here? From other posts I thought that the rerender=none might help, but that didn't change the behavior, nor did choosing another element to rerender.

<apex:form >
    <apex:pageBlock title="Page Block" id="PageBlock" mode="edit">
        <apex:pageMessages />
        <apex:pageBlockButtons >
           <apex:actionStatus id="updatestatus" >
              <apex:facet name="start" >
                <img src="/img/loading.gif" />                    
              </apex:facet>
           </apex:actionStatus>
           <apex:commandButton value="Save" action="{!createCRs}" status="updatestatus" rerender="none"/>
           <apex:commandButton value="Cancel" action="{!cancelCRs}" immediate="true" html-formnovalidate="formnovalidate"/>                
        </apex:pageBlockButtons>

        <apex:pageBlockSection title="Form" columns="1">

[many apex:inputField rows here]              

        </apex:pageBlockSection>
    </apex:pageBlock>
</apex:form>

Thanks for your help, and let me know if I can provide anything else.

  • Try removing the rerender="none" altogether. – Sebastian Kessel Jul 6 '16 at 17:23
  • Removing rerender="none" makes the status indicator disappear entirely, but the PageReference then works. I can't seem to get both to work at the same time. – lforce Jul 7 '16 at 18:32
  • Your problem is that, on a rerender, the page redirection will not happen (because you're doing AJAX, instead of getting a full page from the server). To be honest, I do not normally see status indicators on save like that, but you can make it work with some javascript instead of an actionStatus – Sebastian Kessel Jul 7 '16 at 18:34
  • Thanks Sebastian, I had a feeling that might be the case. – lforce Jul 7 '16 at 21:31
0

Is your developer mode ON, if yes try turning it off.

  • Developer mode was on, turned off and the issue persists. – lforce Jul 7 '16 at 18:31

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.