I try to display a list of objects from an OData V4 service in SAP UI5. I would like to use a property from a JSON Model to set the binding path for the list items.
I thought I can just set the path in the items aggregation of the table:
<Table
items="{
path: '{appView>/dataPath}',
parameters: {
$count: true,
$$updateGroupId: 'peopleGroup'
}
}">...</Table>
and of course define and set the model:
var oViewModel = new JSONModel({
dataPath: "/People"
});
this.getView().setModel(oViewModel, "appView");
For some reason the data is not loaded. There is not even items binded to the table:
oTable.getBinding("items"); // undefined
The JSON Model is defined in the init method of the controller.
Anybody has an idea why this is not working?