Skip to Content
avatar image
Former Member

busyDialog responds to slow

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Sep 18, 2014 at 07:03 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 18, 2014 at 06:42 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Kimmo,

      I just tried it with no success... 😊 Anyways thanks for the suggestion.

      Kind regards,

      RW