Skip to Content
0

Problem with busyDialog

Mar 29, 2017 at 08:58 PM

58

avatar image
Former Member

Hi, I hope can you help me,

i'm working with sap.m.BusyDialog(), the dialog is displayed, but ut it takes a long time to show up.

for example:

1. onValidation: function(){   
2.    Var oBusyLogin = new sap.m.BusyDialog({
3. 		    text: 'Verifying credentials...',
4. 		    busyIndicatorDelay : 0,
5.    });

6.    oControllerLogin.oBusyLogin.open();//Should be shown at this point

7.    // call loadData method of modeljson1

8.    // call loadData method of modeljson2
    
9.    // call loadData method of modeljson3

10.   //The dialogue is just shown at this point
11.   oControllerLogin.oBusyLogin.close();
12.   this.onNavToHome();
13.}

From 7 to 9, there is a waiting time, so the page gives the feeling of not working

What I want is to show the busydialog just run the method validate, not at the end of the method.

I hope you can give me some suggestion.

Thanks in advance.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Jun Wu Mar 30, 2017 at 12:07 AM
0

1.showdialog

2.load data aysnc

3.in the success or failure of loading data method, close the dialog

js is single thread.

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Apparently, when you specified load data async, you solved the problem. Thank you very much Jun Wu.

0