0
我想向sap.ui.unified.MenuItem添加一個額外的文本屬性。它目前只有一個文本屬性。擴展標準UI5控件
我想下面
sap.ui.unified.MenuItem.extend("ExtendedMenuItem",{
metadata:{
properties:{
SetText : {type: "string"}
},
aggregations: {
_SecondText : {type: "sap.ui.commons.Label", multiple : false, visibility: "public"}
}
},
init: function(){
var oSecondText = new sap.ui.commons.Label("TL",{
text: this.SetText
});
this.addAggregation("_SecondText",oSecondText);
},
renderer:"sap.ui.unified.MenuItemRenderer"
});
var oTestCopy = new ExtendedMenuItem("TC",{
text: "TEST COPY",
SetText: "CTRL+TEST"
});
,但沒有被顯示在第二個文本屬性。 我能做些什麼來添加第二個文本屬性到標準的UI5控件?