【发布时间】:2017-03-19 19:34:35
【问题描述】:
我想将一个名为“app”的参数从我的 Fiori 磁贴配置传递到我的应用程序,并在数据绑定中使用它。我收集动态过滤在 xml 视图上是不可能的,this question 建议使用 attachAfterRendering 函数。我在视图控制器中尝试了以下代码,但结果不一致,有时数据加载正确,有时我得到“无数据”。任何帮助将不胜感激。
onInit: function() {
var oStartupParameters = this.getMyComponent().getComponentData().startupParameters;
this._oView = this.getView();
this._oView.attachAfterRendering(function() {
var oTreeTable = this.byId("treeTable");
oTreeTable.bindAggregation("rows", {
path: "/Nodes",
filters: [
new sap.ui.model.Filter("Application", sap.ui.model.FilterOperator.EQ, oStartupParameters["app"])
]
});
});
}
【问题讨论】:
标签: data-binding sapui5 sap-fiori