Rest API calls from UI-Designer forms returns a promise

Abin.Xavier's picture

It would be great if we could have rest api calls from ui designer forms to return a promise so that other actions can be done based on the promise, like a requirement mentioned here


Submitted by Lionel Palacin on Wed, 03/22/2017 - 21:04

Hi, thanks for the idea. Do you have a use case to help us understand the need? Thanks

Submitted by Abin.Xavier on Thu, 04/06/2017 - 14:19

Hi,Thanks for your response :)

I have mentioned a case in the idea post.

My use case is that i have a custom widget for bootstrap alerts and i need to get the alert message from the api call (from UI Designer external api feature) to get data i.e business data model. And give that data as a property to the custom widget(to be displayed as bootstrap alert). The messge is undefined as the custom widget is not waiting until the api call is complete and data is fetched back ie data is undefined at the time the custom widget is rendered.

So for this i need bootstrap alert custom widget to wait for the promise from api call and then display the data that otherwise will be undefined.