Skip to Content
0

How to extend the NavigationListItem control in SAPUI5?

Aug 22, 2017 at 05:50 PM

49

avatar image

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.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Irfan Gokak Aug 23, 2017 at 07:21 AM
0

Please share your code.

Show 1 Share
10 |10000 characters needed characters left characters exceeded
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: {},
},
});
});

0