cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with Busy Indicator in Table and List

andres_levano
Explorer
0 Kudos

Hi gurus,

I'm facing a problem using the filter for a model. For some reason I'm using the same filter to a model to feed two different objects, a Table and a List.

The problem is that when I set a filter criteria with no data, the table shows a couple of minutes the busy indicator and then the message "No data", and it's ok. But when I do the same excercise with the List, the busy indicator never stops.

Is there any attribute that I'm maybe not considering to make it work correctly?

I tried using:

and it stops the busy indicator but maintain the last data on the view.

the I tried with:

and in no case I get a Failed request, so never get in there.

Thanks for your time!

Andrés

Accepted Solutions (1)

Accepted Solutions (1)

daniel_ruiz2
Active Contributor
0 Kudos

hi Andres,

It looks like you're actually "selecting" records - this would imply it's a GET operation. However, in your code, you refer to oModel.attachBatchRequestFailed but it doesn't look like you're doing a batch request at all.

How about you use oModel.attachRequestFailed and oModel.attachRequestCompleted instead and check if it stops there?

Cheers,

Dan.

andres_levano
Explorer
0 Kudos

Hi Daniel,

thanks for your help.

I tried with oModel.attachRequestFailed with no success, it dind't stop.

Now I'm trying to do something like:

var messageModel = sap.ui.getCore().getMessageManager().getMessageModel();

in order to get the error message, the thing is that I can't capture the error to stop the busy indicator.

Thank you again!

former_member182372
Active Contributor
0 Kudos

your showErrorMessage method IS called because it causes the exception

wrap it in controller method and call setBusy to false and THEn call showErrorMessage

daniel_ruiz2
Active Contributor
0 Kudos

hi Andres,

As Maksim mentioned, looking at Chrome's trace stuff seems to be just fine - perhaps your handler function does not have the necessary parameters to allow you to read the response in the javascript.. how does your handler function looks like?


Cheers,

Dan.

andres_levano
Explorer
0 Kudos

Hi gurus,

I solved my problem, not changing the implementation, but changing the template. I started this development a weeks a go, using the oeprative (in that moment) template Full Screen 1.0.0 (deprecated), today I migrated it to the version Worklist 1.28, according to my client server version and now it's working fine. Sends the message and the busy indicator cuts when it has to do it.

Thanks a lot for your help and time!

Answers (2)

Answers (2)

former_member182372
Active Contributor
0 Kudos

using delayCall (5000 is bad idea

control/binding/model provide plenty of callback methods to set busy to false once operation is complete

andres_levano
Explorer
0 Kudos

HI Maksim,

thanks for your answer. I used the requestComplete and requestFailed methods, and in the table and list aswell I g a "bad request status 400" message. It never triggers any event so I can't catch it. In the other hand the table stops the busy indicator and the list don't. I re developed the list and maintains the behavior.

I Don't get how to catch the bad request exception in order to stop the busy indicator

thanks for your help!

former_member182372
Active Contributor
0 Kudos

you can try DataReceived of binding

oTable.getBinding("items").attachDataReceived(function () {

//   setControlBusy(oTable, false);

....

andres_levano
Explorer
0 Kudos

Hi Maksim,

thanks for your replay again. I just developed it, and the problem is the same, because the call to the service never come back. I get this message in the console:

That method attachDataReceived works fine when I filter with correct values, but when the filter doesn't return values I get that message and never pass by that method.

Thanks a lot for your help!

former_member182372
Active Contributor
0 Kudos

so you have requestComplete and requestFailed  on model and DataReceived  on binding and it doesnt stop in any of those???

btw, that udexOf of undefined is coming from where? use dbg mode to have more readable sources

andres_levano
Explorer
0 Kudos

Exactly!

I already debugged it.

Here the details, I filter with dates, when I put a date that doesn't have any SAP Document, it returns that message. I watch the data in two elements, a table and a list. The table does't have problems. The list stays loading data.

I have those three methods and never stop in this case.

I use a OData service to get the SAP Orders.

I get this from the console:

And i have this in the Component.js of a Full Screen template:

Maybe there is a way to capture the message and stop the busy indicator and set the "nodata" text.

Thanks in advance!

former_member182372
Active Contributor
0 Kudos

dude, it is you custom codce throwing an excception. requestFailed is fired, place setBusy before any parsing logic ( like _parseError )

junwu
Active Contributor
0 Kudos

title says something, your content says something else