我想扩展NavigationListItem控件以接受其聚合中的sap.ui.core.Control对象。我创建了一个单独的文件来扩展控件,并在元数据部分添加了一个名为'rows'的新聚合,类型为sap.ui.core.Control。扩展控件在视图中被调用,但它没有显示添加到新聚合“行”的任何子控件。如果我需要在扩展文件中添加更多内容,请告知。
分机代码:
sap.ui.define(["sap/ui/core/Control",
"sap/tnt/NavigationListItem"],
function(Control, NavigationListItem) {
"use strict";
return NavigationListItem.extend("ajacontrolExt.control.NavigationCustomListItem", {
metadata: {
properties: {
},
defaultAggregation: "rows",
aggregations: {
rows: {
type: "sap.ui.core.Control",
multiple: true,
singularName: "row"
}
}
}
});
});