sap.ui.core.BusyIndicator.show() is not working on button click. How to show busy indicator on button click in UI5?

by | Apr 7, 2022 | UI5 Programs

Preface – This post is part of the UI5 Programs series.

SAP UI5 provides various ways to show the Busy indicator. These busy indicators can be initiated based on events in the project. In this article, we will discuss busy indicator alternatives in detail.

What are busy Indicators?

A busy indicator is a loader symbol shown to the user to showcase that something is going on in the background, and the user has to wait until it completes. This is a good way to stop the end-users from interacting with the web app during a background task. You can read the official documentation here.

Types of busy Indicators

Following are the three types of busy indicators provided by SAP:

  • sap.ui.core.BusyIndicator

  • sap.m.BusyDialog

  • sap.m.BusyIndicator

We will discuss these busy indicators in different article.

sap.ui.core.BusyIndicator.show() is not working on button click. How to show the busy indicator on button click in UI5?

In case sap.ui.core.BusyIndicator,show() is not getting triggered although you have mentioned it before your operation starts, then you can replace it with the below code:

var oGlobalBusyDialog = new sap.m.BusyDialog(); // Initiate a Busy Dialog
oGlobalBusyDialog.open(); // => Start the Indicator
//your external API or operation call
// Success or Error of your call => Close the Indicator
 oGlobalBusyDialog.close();

Let us know in the comment if you have any issues.

Author

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.