on 10-30-2023 8:03 AM
Greeting Experts,
I am trying to execute Busy Indicator/Dialog in synchronous POST ajax call in UI5 like this.
and Ajax call:
I am using Node as a backend API. I have tried as several ways but Busy Indicator is not opening and Busy Dialog is opening but after execution of POST call. Kindly help me to address the issue.
Thanks and Regards,
Madhav
In browsers, the UI thread is the main thread. While the main thread is busy awaiting a response from the server synchronously, it cannot update the UI at the same time and keeps the UI therefore frozen during the round trip. That is also why the busy indicator cannot be reliably shown during that time. You need to remove the `async: false` and generally never rely on sync XHRs in application development with SAPUI5.
Sync XHR is in the process of being removed by the web as per https://xhr.spec.whatwg.org/#the-open()-method:
> "Synchronous XMLHttpRequest outside of workers is in the process of being removed from the web platform as it has detrimental effects to the end user’s experience. [...] Developers must not pass false for the async argument when the current global object is a Window object. [...]"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
9 | |
9 | |
7 | |
7 | |
7 | |
7 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.