Skip to Content
0

VizFrame wait for data to load - renderComplete too soon

Nov 30, 2016 at 10:46 AM

113

avatar image

Hey experts

I was wondering if there was any way you can wait for the vizframe to be on the screen. I used the following methods onAfterRendering en renderComplete. They both get called too soon. Usually the vizframe takes 3-5 seconds to load. But I can't use any form of timers. Anyone have any idea what I can use?

kind regards,

Matthijs

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Uladzislau Pralat May 01, 2017 at 12:15 PM
0

Hi Matthijs,

please try this:

oVizFrame3.getModel().attachRequestSent(function() { sap.ui.core.BusyIndicator.show(0); }); oVizFrame3.getModel().attachRequestCompleted(function() { sap.ui.core.BusyIndicator.hide(); });

Regards, Uladzislau

Show 1 Share
10 |10000 characters needed characters left characters exceeded

This works too and is much shorter.

Thank you for answering.

0
Matthijs Mennens Nov 30, 2016 at 11:05 AM
0
This is the method I used, if anyone knows any better way to check, please 
tell me
		waitVizRender: function(oVizFrame) {
			var bRendering = true;
			oVizFrame.addEventDelegate({
				onBeforeRendering: function() {
					if (bRendering === true) {
						sap.ui.core.BusyIndicator.show(0);
					}
				}
			}, oVizFrame);


			oVizFrame.addEventDelegate({
				onAfterRendering: function() {
					oVizFrame.getModel().attachRequestCompleted(function() {
						sap.ui.core.BusyIndicator.hide();
						bRendering = false;
					});
				}
			}, oVizFrame);
		}
Share
10 |10000 characters needed characters left characters exceeded