Skip to Content
0

More Fun with Promises

Oct 19, 2017 at 08:52 PM

35

avatar image

Nice basic one hopefully with JavaScript promises in SAPUI5.

Function1 calls Function2 (both used to setup my view Model)

Function3 displays the view model.

How can I force Function3 to only execute when Function2 has finished?

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

1 Answer

Sergio Guerrero Oct 25, 2017 at 10:14 PM
0

would a jquery deferred or promise do the trick?

https://api.jquery.com/deferred.done/

https://api.jquery.com/promise/

if you are using a ui5 odata model, then you can call attachRequestCompleted https://stackoverflow.com/questions/35202170/sapui5-openui5-model-attachrequestcompleted-in-oninit-function

Share
10 |10000 characters needed characters left characters exceeded