on 09-18-2014 12:41 PM
Hi,
I have a sap.m.BusyDialog coupled to my odatamodel using the 'attachRequestSent' method.
var oModel = new sap.ui.model.odata.ODataModel(
sServiceUrl, false);
oModel.attachRequestSent(function() {
busyDialog.open();
});
oModel.attachRequestCompleted(function() {
busyDialog.close();
});
The dialog shows up to late, when the new data is almost loaded. I want the busydialog to pop up right at the moment when I press the button.
Anyone who can help me?
Kind regards,
RW
Have you tried moving the open method into your button event?
The RequestSent event is only fired once the data request is made, so depending on when you create the model it could be loading the metadata etc. before you display the busy dialog?
Regards,
Jason
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Glad that was helpful.
Here's a link to Stackoverflow explaining setTimeout with 0 delay:
http://stackoverflow.com/questions/779379/why-is-settimeoutfn-0-sometimes-useful
Regards,
Kimmo
Hi Robbe,
I'm more familiar with JSONModel but does it open immediately if you open the busyDialog before initializing ODataModel?
busyDialog.open();
var oModel = new sap.ui.model.odata.ODataModel(
sServiceUrl, false);
oModel.attachRequestCompleted(function() {
busyDialog.close();
});
Of course, then you would have to remember to open the dialog every time a request is sent.
Regards,
Kimmo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.