I am trying to bind items in a sap.m.Table (preventing usage of a Factory function) and I am getting this error:
Missing template or factory function for aggregation items of Element
My views looks as follows:
<Table id="favTable">
<headerToolbar>
<Toolbar>
<Title id="tableHeader" text="{i18n>tableHeader}"/>
</Toolbar>
</headerToolbar>
<columns>
<Column>
<Label text="{i18n>serviceNameColText}" />
</Column>
<Column>
<Label text="{i18n>serviceTechNameColText}"/>
</Column>
<Column width="50px"/>
</columns>
<ColumnListItem>
<Text text="{Text}" />
<Text text="{Service}" />
<Button icon="sap-icon://delete" press="onDeleteRow" />
</ColumnListItem>
</Table>
According controller code (using a bound OData service) tries to bind items into the view after the route has been hit:
_onPatternMatched: function(oEvent) {
let oTable = this.getView().byId(sIdTable);
// bind items dynamically with attributes
const sGroupId = oEvent.getParameter("arguments").Group;
let sBindingPath = "/DataSet(SetId='" + sSetId + "')"
oTable.bindItems({
path: sBindingPath,
parameters: {
navigation: {
FavoriteGroupSet: "ToFavorites"
}
},
filters: [
// new Filter("InstitutionId", "EQ", oEvent.getParameter("arguments").Institution),
new Filter("SetId", "EQ", sSetId)
]
})
},
What do I need to do to make the correct binding to show up the correct data?