cancel
Showing results for 
Search instead for 
Did you mean: 

VizFrame wait for data to load - renderComplete too soon

11-30-2016 11:46 AM
1200 views 3 comments Go to solution
0 Likes
SAP Managed Tags
Subscribe

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

0 Likes

Accepted Solutions (1)

Accepted Solutions (1)

uladzislau_pralat
Contributor
0 Likes

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

0 Likes

This works too and is much shorter.

Thank you for answering.

Answers (1)

Answers (1)

0 Likes
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);
		}