您好我正在使用SAPUI5 tree table。 现在我的模型是这样的
{
name: "BookingCollection",
//operations:operations,
0:{
name: "Query",
dropDown: false,
img: "op" <-- Should LOAD SECOND but the get request for it is never fired
},
1: {
name: "Read",
dropDown: false,
img: "op"
},
2: {
name: "Create",
dropDown: false,
img: "op"
},
3: {
name: "Update",
dropDown: false,
img: "op"
},
4: {
name: "Delete",
dropDown: false,
img: "op"
},
dropDown: true,
img: "et" <-- GETS LOADED FIRST AS IT IS PARENT
}
我对ImageControl的键' img '具有约束力:
var nodeImage = new sap.ui.commons.Image();
nodeImage.bindProperty("src", {
path:"img",
formatter:function (value) {
switch (value) {
case 'et':
return "images/gv/et.png";
case 'op':
return "images/gv/opr.gif"
}
},
mode: sap.ui.model.BindingMode.TwoWay
});
现在问题是,即使格式化程序返回子图像的正确路径,也会为子项显示父项图像。
是否因为一些约束性问题?为什么像Query,Read等子元素也引用父母的图像?