日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

SAP UI5 Require Busy dialog

發(fā)布時(shí)間:2023/12/19 编程问答 33 豆豆
生活随笔 收集整理的這篇文章主要介紹了 SAP UI5 Require Busy dialog 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

Sent: Thursday, June 18, 2015 4:50 PM

研究一下進(jìn)入MY OPPORTUNITY的時(shí)候,BUSY INDICATOR為什么消失的很晚(似乎是LIST和DETAIL都好了后才消失)

概括地說,Ross描述的busy dialog在LIST和DETAIL的數(shù)據(jù)都回來了才消失的,這個(gè)behavior是working as designed的。具體看下面的代碼。

為了更深入理解busy dialog,可以看附件兩個(gè)視頻。

我在Opp header ETAG的后臺實(shí)現(xiàn)里加了一個(gè)10s的延時(shí)。

n 第一個(gè)video timeout_1500.wmv: 雖然list和detail的數(shù)據(jù)都ready了,但是因?yàn)镋TAG需要10s才能返回,整個(gè)UI被這個(gè)ETAG的request造成的busy dialog鎖住了,直到10s后UI才能點(diǎn)擊
n 第二個(gè)video是把默認(rèn)的timeout從1500毫秒改成30秒,即busy dialog不會顯示。從video里看出UI始終是可操作的,盡管后臺的ETAG還沒有回來。
這個(gè)busy dialog實(shí)際上也是一種保護(hù)措施。如果UI上某些操作必須依賴于最新的ETAG,采用這種方式可以讓user同步的ETAG請求返回UI之前就能夠進(jìn)行操作,會造成state的inconsistency。

Key message we could find in the source code:

  • 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.
  • 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–.
  • it is obsolete. New application should use sap.m.BusyDialog instead.
  • Take the process to open Opportunity tile as example.

  • The bindAggregation in S2.controller.js will trigger the Odata request sent to backend:
  • request url:

    And connectionManager is responsible to call requireBusyDialog:

    iRequiredCount changed from 0 to 1:

  • OpportunityAttachment data is requested. ConnectionManager calls another requireBusyDialog, iRequiredCount changed from 1 tp 2:
  • in detail view, ETAG refresh operations makes iRequiredCount changed from 2 to 3:
  • At this time, the response of request in step1 has been returned to frontend, ConnectionManager calls releaseBusyDialog:
  • iRequiredCount changes from 3 to 2:

    Since now iRequiredCount still > 0, the busyDialog will not be closed.

  • the response for request in step2 is returnd, iRequiredCount changes from 2 to 1:
  • the ETAG request sent in step3 has response now, iRequiredCount changes from 1 to 0:
  • now busy dialog is closed:

    要獲取更多Jerry的原創(chuàng)文章,請關(guān)注公眾號"汪子熙":

    創(chuàng)作挑戰(zhàn)賽新人創(chuàng)作獎(jiǎng)勵(lì)來咯,堅(jiān)持創(chuàng)作打卡瓜分現(xiàn)金大獎(jiǎng)

    總結(jié)

    以上是生活随笔為你收集整理的SAP UI5 Require Busy dialog的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

    如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。