Do you know how can i change your url button code custom widget and add a loading icon that will be s display when clicking on the button on will be hidden when the service will return a response?
Solved! Go to Solution.
Caroline,
You just have to hitch your result and error function to the current scope of this.
requestHandle.then(
lang.hitch(this, function (response) {
var responseJSON = JSON.stringify(response, null, 2);
//alert(responseJSON);
this.loadingPanel.hide();
this.isOpening = false;
WidgetManager.getInstance().closeWidget(this);
}),
lang.hitch(this, function (error) {
//alert( error.message);
this.loadingPanel.hide();
this.isOpening = false;
WidgetManager.getInstance().closeWidget(this);
})
);