cancel
Showing results for 
Search instead for 
Did you mean: 

How to extend the NavigationListItem control in SAPUI5?

ansonabraham
Participant
0 Kudos

I want to extend the NavigationListItem control to accept sap.ui.core.Control objects in it's aggregation. I have created a separate file to extend the control and added a new aggregation called 'rows' with type sap.ui.core.Control in the metadata section. The extended control is getting called in the view, but it is not displaying any child controls which were added to the new aggregation 'rows'. Please advise, if I need to add anything more to the extension file.

Accepted Solutions (0)

Answers (1)

Answers (1)

irfan_gokak
Contributor
0 Kudos

Please share your code.

ansonabraham
Participant
0 Kudos
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"
}
},
events: {},
},
});
});