sap.ca.ui.utils.busydialog scenario discussion
2023-09-14 09:02:42 时间
Created by Jerry Wang, last modified on Jun 29, 2015
Key message we could find in the source code:
1. after sap.ca.ui.utils.busydialog.requireBusyDialog() is called in application, we can only see the rotating wheel in UI after 1.5 seconds - defined in BUSYDIALOG_TIMEOUT.
2. the requireBusyDialog and releaseBusyDialog must be called in pair. There is private variable _iRequiredCount maintained inside the implementation. When require function is called, _iRequiredCount++; release for _iRequiredCount--.
3. it is obsolete. New application should use sap.m.BusyDialog instead.
![](https://user-images.githubusercontent.com/5669954/27353944-3566ad12-5606-11e7-9cb4-fdcd3a360787.png)
![](https://user-images.githubusercontent.com/5669954/27353945-356b3a6c-5606-11e7-8fbb-7bfea7b36862.png)
Take the process to open Opportunity tile as example.
1. The bindAggregation in S2.controller.js will trigger the Odata request sent to backend:
![](https://user-images.githubusercontent.com/5669954/27353947-3572fd42-5606-11e7-8426-ff4f3cb2d8f3.png)
request url:
![](https://user-images.githubusercontent.com/5669954/27353946-356e8cee-5606-11e7-8346-2e0adb455f6d.png)
And connectionManager is responsible to call requireBusyDialog:
![](https://user-images.githubusercontent.com/5669954/27353949-357d648a-5606-11e7-8e7f-14456cc2378e.png)
iRequiredCount changed from 0 to 1:
![](https://user-images.githubusercontent.com/5669954/27353948-357b9f56-5606-11e7-8871-1dd371713902.png)
2. OpportunityAttachment data is requested. ConnectionManager calls another requireBusyDialog, iRequiredCount changed from 1 tp 2:
![](https://user-images.githubusercontent.com/5669954/27353950-357d9b6c-5606-11e7-9145-4600ee53c08d.png)
![](https://user-images.githubusercontent.com/5669954/27353951-3580eb50-5606-11e7-8ae1-b621fcbdf69d.png)
3. in detail view, ETAG refresh operations makes iRequiredCount changed from 2 to 3:
![](https://user-images.githubusercontent.com/5669954/27353952-3586ac84-5606-11e7-8a1f-d4f6c074c358.png)
4. At this time, the response of request in step1 has been returned to frontend, ConnectionManager calls releaseBusyDialog:
![](https://user-images.githubusercontent.com/5669954/27353953-358a2c10-5606-11e7-9bab-83ec60216e03.png)
iRequiredCount changes from 3 to 2:
![](https://user-images.githubusercontent.com/5669954/27353956-35955b3a-5606-11e7-8528-e4064873a95f.png)
Since now iRequiredCount still > 0, the busyDialog will not be closed.
![](https://user-images.githubusercontent.com/5669954/27353954-3594b1da-5606-11e7-917e-418bfd06721a.png)
5. the response for request in step2 is returnd, iRequiredCount changes from 2 to 1:
![](https://user-images.githubusercontent.com/5669954/27353955-359528fe-5606-11e7-9d9d-5fefb89605b5.png)
6. the ETAG request sent in step3 has response now, iRequiredCount changes from 1 to 0:
![](https://user-images.githubusercontent.com/5669954/27353941-3543e2c8-5606-11e7-8803-f5804aec1763.png)
now busy dialog is closed:
![](https://user-images.githubusercontent.com/5669954/27353942-355f477a-5606-11e7-83fb-9dd7a3b1cf26.png)
test1:
在header ETAG的implementation里加了一个10秒的时延:测试结果是直到header ETAG的response回来之后,busy dialog才消失。
![](https://user-images.githubusercontent.com/5669954/27353943-3565fbc4-5606-11e7-8e6a-610029bc01c2.png)
test2:将timeout从默认的1500ms改成30000ms:
sap.ca.ui.utils.BUSYDIALOG_TIMEOUT = 30000;
- 第一个video timeout_1500.wmv: 虽然list和detail的数据都ready了,但是因为ETAG需要10s才能返回,整个UI被这个ETAG的request造成的busy dialog锁住了,直到10s后UI才能点击
- 第二个video是把默认的timeout从1500毫秒改成30秒,即busy dialog不会显示。从video里看出UI始终是可操作的,尽管后台的ETAG还没有回来。
要获取更多Jerry的原创文章,请关注公众号"汪子熙":
![](https://user-images.githubusercontent.com/5669954/61616089-2a87e180-ac9a-11e9-861d-c29c2cf897af.png)
相关文章
- SAP Smart Table 的 Personalization(个性化配置)试读版
- SAP UI5 sap.ui.layout.Grid 控件概述
- SAP UI5 ManagedObject 的 Association 讲解
- SAP UI5 应用开发教程之六十一 - 在 SAP UI5 应用里绘制甘特图 Gantt Chart 试读版
- SAP OData batch request的并行处理实现原理
- OPA 10 - sap.ui.test.matchers.PropertyStrictEquals
- data-sap-ui-icon-content where does icon content come from
- sap.ca.ui.utils.busydialog - scenario1 - opportunity opened
- SAP UI5 GM6 require sap.ui.core.Core
- SAP CRM Fiori Opportunity应用功能一览
- sap.ca.ui.utils.busydialog scenario discussion
- sap.ca.ui.model.format.NumberFormat format logic for Globalization
- 如何隐藏SAP CRM WebClient UI配置页面的字段
- SAP CRM WebClient UI根据扩展字段搜索出结果的实现原理
- SAP CRM WebClient UI的on_new_focus应该怎么理解
- SAP CRM呼叫中心点了interact按钮后的处理逻辑
- SAP Commerce Cloud Spartacus UI 的购物车 Cart 功能
- SAP CRM WebClient UI上分销渠道点击展开按钮后执行了哪些逻辑
- 在SAP HANA Express Edition里进行文本分析
- SAP CRM WebClient UI Selenium UI session的实现
- SAP Analytics Cloud里的Planning model
- SAP UI5 图片显示控件 Avatar 的使用方式介绍试读版
- SAP Fiori 的学习路线指南
- 如何理解 SAP UI5 的 sap.ui.define 函数
- SAP Fiori smart template技术里CDS view的注解和UI元素对应关系