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

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

Require Busy dialog

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

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

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

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

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

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

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

    總結(jié)

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

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