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.

4
  • Try removing the rerender="none" altogether. Commented Jul 6, 2016 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. Commented Jul 7, 2016 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 Commented Jul 7, 2016 at 18:34
  • Thanks Sebastian, I had a feeling that might be the case. Commented Jul 7, 2016 at 21:31

1 Answer 1

1

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

1
  • Developer mode was on, turned off and the issue persists. Commented Jul 7, 2016 at 18:31

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.