function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
AussieBattlerAussieBattler 

Problem with actionStatus when using Ajax multiple times in page

Hi. Is there a problem with displaying the actionStatus message when there are more than one partial page updates on a page?

I have a page which contains two output panels and one of the panels is updated depending on which commandlink is clicked. To be clear, the panels still do update correctly (using ajax) and display the content they are expected to show however the actionStatus message does not work. It was working when there was only one panel on the page.

In case it is important, in the code below the addPersonalDetails and addMoreDetails functions simply updates a variable. But as I say, it is working as I expect for both outputPanels but the actionStatus message does not display.

(Also, while I think of it, it would be very handy if the functionality existed to allow us to backup a page before we continued to work on it. Sort of a roll back type functionality).

Thanks.

Code:
<apex:pageBlock mode="detail">
<apex:facet name="header">
<apex:outputPanel>
<apex:commandLink action="{!addPersonalDetails}" title="Personal Details" rerender="personaldetails">Personal Details</apex:commandLink>
</apex:outputPanel>
</apex:facet>
<apex:outputPanel id="personaldetails">
<apex:actionStatus startText="Please wait...">
<apex:facet name="stop">
<apex:panelGrid columns="4">
<apex:outputText value="Gender"></apex:outputText>
<apex:outputText value="{!PersDetails.Gender__c}"></apex:outputText>
<apex:outputText value="Middle Name(s)"></apex:outputText>
<apex:outputText value="{!PersDetails.Middle_Names__c}"></apex:outputText>
<apex:outputText value="Date of Birth"></apex:outputText>
<apex:outputText value="{!PersDetails.Date_of_Birth__c}"></apex:outputText>
<apex:outputText value="Marital Status"></apex:outputText>
<apex:outputText value="{!PersDetails.Marital_Status__c}"></apex:outputText>
</apex:panelGrid>
</apex:facet>
</apex:actionStatus>
</apex:outputPanel>
</apex:pageBlock>

<apex:pageBlock mode="detail">
<apex:facet name="header">
<apex:outputPanel>
<apex:commandLink action="{!addMoreDetails}" title="More Details" rerender="moredetails">More Details</apex:commandLink>
</apex:outputPanel>
</apex:facet>
<apex:outputPanel id="moredetails">
<apex:actionStatus startText="Please Wait...">
<apex:facet name="stop">
<apex:panelGrid columns="4">
<apex:outputText value="Date of Birth"></apex:outputText>
<apex:outputText value="{!moreDetails.Date_of_Birth__c}"></apex:outputText>
<apex:outputText value="Middle Name(s)"></apex:outputText>
<apex:outputText value="{!moreDetails.Middle_Names__c}"></apex:outputText>
<apex:outputText value="Date of Birth"></apex:outputText>
<apex:outputText value="{!moreDetails.Date_of_Birth__c}"></apex:outputText>
<apex:outputText value="Marital Status"></apex:outputText>
<apex:outputText value="{!moreDetails.Marital_Status__c}"></apex:outputText>
</apex:panelGrid>
</apex:facet>
</apex:actionStatus>
</apex:outputPanel>
</apex:pageBlock>

 

AussieBattlerAussieBattler
By the way, in case it is of interest, I worked out what I was doing wrong. I needed to give an ID to the actionStatus components, and then add to the CommandLink components the attribute Status and type in the ID for the relevant actionStatus component it should be referring to.

Hope that makes sense.