Skip to Content
avatar image
Former Member

[UI5 Component]How to let UI5 component init process includes async process

Hi Experts,

I'm writing a component which needs create something in backend services. As the component loaded async. I want to find a way to let component only "ready" when all async backend operation is done.

Code of component

--------

onInit() {

//call a routine with promise.

}

--------

Code in component user

------------------------

var componentPromise = sap.ui.component( { name: xxx

, async: true, settings: { componentData: oData } }

); componentPromise.then(

// I hope when the UI5 says the component is loaded, not the onInit is executed, but several async operation inside the onInit is also returned.

...

------------------------

Is there any trick to let it feasible?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers