Skip to Content

VizFrame wait for data to load - renderComplete too soon

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    May 01, 2017 at 12:15 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 30, 2016 at 11:05 AM
    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);
    		}
    
    Add comment
    10|10000 characters needed characters exceeded