gpt4 book ai didi

表的 SAPUI5 bindAggregation 完成

转载 作者:行者123 更新时间:2023-12-02 03:34:03 25 4
gpt4 key购买 nike

我将聚合绑定(bind)到表。我找不到绑定(bind)完成后触发的事件。 sap.m.List 有“updateFinished”事件,这正是我在表(和下拉列表)中寻找的。我想在模型上使用 attachRequestCompleted() ,但该模型用于我不希望触发此事件的其他地方。

一旦在表(和下拉列表)上完成数据绑定(bind),是否有触发事件?

任何帮助表示赞赏。

提前致谢。

更新 :从 ListBase 扩展的表有“updateFinished”事件。在发布这个问题之前,我仍然不确定我是如何错过它的。但是,这个问题对于下拉列表和 TableSelectDialog 控件仍然有效。

最佳答案

我也偶然发现了这个问题,但在不同的上下文中。
我有一个网格布局,在其中我通过 oData 模型动态加载面板。

因此,我在我的 XML Grid-View 元素中输入了路径。

<l:Grid id="grid" content="{some path...}">...</l:Grid>

现在我想将 GridView 设置为繁忙,并在加载数据时恢复它。

因此我使用 GridView 的绑定(bind)。
在 Controllers onInit 方法中,我添加了:
this._oGrid = this.getView().byId("grid");
this.getRouter().attachRouteMatched(this._onRouteMatch.bind(this));

请注意,绑定(bind)方法并非在每个浏览器中都可用。您需要应用 polyfill。 (见 https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Global_Objects/Function/bind)

Bind 也与绑定(bind)无关:D

我需要这样做,因为绑定(bind)在 onInit 函数中不可用。

_onRouteMatched 函数:
var oContent = this._oGrid.getBinding("content");
oContent.attachDataReceived(function(oData) {
this._oGrid.setBusy(false);
}.bind(this));

现在,当接收到数据时,busy 选项设置为 false。

关于表的 SAPUI5 bindAggregation 完成,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24886647/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com