Skip to Content
avatar image
Former Member

Busy Indicator in recursive Odata Call not working

Hi All,

I have an requirement where in i have to call the gateway service multiple times from the UI. I had to show the Busy Indicator when i am fetching data and have to hide the Busy Indicator once all the service calls which called in recursively. In the Busy Indicator i have to show the Progressive Indicator showing how many percentage completed during each service call has to be updated.

The problem which i am facing now is when i am calling the Busy Indicator - sap.m.BusyIndicator first time i am getting the Progressive Indicator (some text with Percentage and no's) is coming up and the incremental update is not working when each service is called. Once all the service call is done the Busy Indicator is updated with the final results with Progressive Indicator. The Busy Indicator some how is not updating the model which i am doing it in after the service call is done. When i am debugging the Busy Indicator is working fine with the Incremental Progressive indicator after each service call. Please find below the code snippet

this.showBusyIndicator();

if (employeedata.length > 0) {

if (empdata.length > Number(Threshold)) {

var initialEmployeeData = employeedata.splice(0, maxThreshold);

jQuery.sap.delayedCall(0, this, function() {

var newCompData = 25;

for (var i = pageConfig.CurrPage; i <= pageConfig.NoOfPages; i++)

{

models.modelAction(ref, userdata, initialEmployeeData, [], [], [], "", failureMsg);

}

In the success call back of Model i have the below code for Progress Indicator. I have mocked the data but in real time i will be calling a method for determining the values.

Query.sap.delayedCall(10, this, function() {

var data = viewRef.getView().getModel("Status").getData();

data.EmpCount = data.EmpCount + 25;

ref.getView().getModel("Status").setData(data);

if(data.EmpCount >= data.TotalPageCount){

jQuery.sap.delayedCall(1000, this, function()

{ viewRef.hideBusyIndicator();

});

}

});

Kindly let us know if any one have solution for the Busy Indicator.

Thanks and Regards,

Saravanan

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Jul 22, 2017 at 06:07 PM

    The data values for busy indicator is not updated synchronously.

    You need to ensure that data values are getting updated synchronously.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 23, 2017 at 12:21 AM

    Hi Sharath,

    Thanks for your reply. I am updating the data value for busy indicator synchronously once the data is fetched from backend. I am not sure what i am missing.

    Thanks and Regards,

    Saravanan

    Add comment
    10|10000 characters needed characters exceeded