SiddP February 2016

Busy Indicator not working - openui5

Below is the code in view.js:

chart1 = new sap.ui.core.HTML({
            content:  "<div id=\"sdtochart1\" style=\"width: 100%; \"></div>",
            layoutData: new sap.ui.layout.GridData({span: "XL12 L12 M12 S12"}),
                                        })  

The below code is placed in onAfterRendering in controller.js

var bBusy = !chart1.isBusy();
        chart1.setBusy(bBusy);

The intention above is to show busy indicator till the content of the html is loaded completely. But I dont see any busy indicator.

Answers


schnoedel February 2016

The id of your outermost html element has to be the same as the id of your HTML control. Otherwise the setBusy() function will not find the element to add the busy overlay div to.

chart1 = new sap.ui.core.HTML({
        id: "sdtochart1",
        content:  "<div id=\"sdtochart1\" style=\"width: 100%; \"></div>",
        layoutData: new sap.ui.layout.GridData({span: "XL12 L12 M12 S12"}),
                                    })  


Kush Kashyap February 2016

Have you first tried to set the HTML control as Busy ? Also the method to get the busy status is getBusy()

From the documentation:

getBusy(): boolean
Gets current value of property busy.
Whether the control is currently in busy state.

Default value is false.

Returns:
{boolean}   Value of property busy

Post Status

Asked in February 2016
Viewed 1,649 times
Voted 12
Answered 2 times

Search




Leave an answer