我创建了一个 sap.m.ObjectIdentifier
对象,并将属性绑定(bind)到路径,如下所示:
const oObjectIdentifier = new ObjectIdentifier();
oObjectIdentifier.bindProperty("title", {
path: "{Objects>Object}"
});
oObjectIdentifier.bindProperty("text", {
path: "{Objects>Objecttext}"
});
它是 Tree
的聚合表:
this.byId("ClassObjectTable").bindItems({
path: "Objects>/",
template: oColList
});
之前,我做了以下操作:
const oObjectIdentifier = new ObjectIdentifier({
title: "{Objects>Object}",
text: "{Objects>Objecttext}"
});
并且成功了。
我做错了什么?
最佳答案
oObjectIdentifier.bindProperty("title", { path: "{Objects>Object}" });
What am I doing wrong?
path
值的语法无效。删除大括号:
oObjectIdentifier.bindProperty("title", {
path: "Objects>Object"
});
关于sapui5 - 如何正确分配bindProperty中的路径?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53814968/