cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with Busy indicator loading on action

Former Member
0 Kudos

Hi, 

I tried to call busy indicator on the button press and after the oData operation it should get closed.
But the problem is the "Busy indicator" is not getting loaded immediately after pressing the button.
Below is my code for loading busy indicator,
onOpenDialog: function (oEvent)
{
// instantiate dialog
if (!this._dialog)
{
this._dialog = sap.ui.xmlfragment("Travel.Create.util.BusyDialog", this);
this.getView().addDependent(this._dialog);
}

  // open dialog jQuery.sap.syncStyleClass("sapUiSizeCompact", this.getView(), this._dialog); this._dialog.open(); // simulate end of operation jQuery.sap.delayedCall(2000, this, function () { this._dialog.close(); }); }, 

handlePressSubmit:function(Draft_flag)
{
this.onOpenDialog();
/* logic for oData operation here*/
}
did i miss anything?

-Mahi

Accepted Solutions (0)

Answers (1)

Answers (1)

pfefferf
Active Contributor
0 Kudos

At which position in your coding you call the "open" function for your dialog?

Former Member
0 Kudos

Below is my sample code for calling the opendialog,

handlePressSubmit:function(Draft_flag)

{

this.onOpenDialog();

/* logic for oData operation here*/

}

pfefferf
Active Contributor
0 Kudos

The question was more related to the coding which opens the dialog. Due to the formatting in your initial post it cannot be seen what is commented out and what is not commented out (I mean that coding in the quoted area).

Former Member
0 Kudos

Sorry i took it in wrong way...

here the formatted code part of calling open function

onOpenDialog:function(oEvent)
{
if (!this._dialog)
{
this._dialog = sap.ui.xmlfragment("Travel.Create.util.BusyDialog", this);
this.getView().addDependent(this._dialog);
}

jQuery.sap.syncStyleClass("sapUiSizeCompact", this.getView(), this._dialog);
this._dialog.open();

jQuery.sap.delayedCall(2000, this, function () {
this._dialog.close();
});
},
pfefferf
Active Contributor
0 Kudos

The coding looks ok so far. Is your resource path for the fragment ok? Do you get any errors in the console?

Former Member
0 Kudos

No. I didn't get any error in console.