Hi everyone,
refering to this thread:
I have the same problem: On my page I have a sap.m.table with items aggregation bound to an OData EntitiySet. When the page is called, the GetEntitySet is called in the backend system without any filters and that takes some time because there are lots of records and to get them is quite expensive. At the top of that page I have a form with some input controls for the user to enter values which are then used to build filters for the table binding.
What I want to achieve is that the table is initially empty and will be populated with data as soon as the user has at least specified one filter.
So I removed the
items="{/MyEntitySet}'
from the table declaration in my XML view and tried to set the binding in the controller when the user entered some values
var oBinding = oTable.bindItems({path: "/MyEntitySetSet" }); oBinding.filter(aFilters);
This does not work because I'm not passing the template parameter which is required:
Uncaught Error: Missing template or factory function for aggregation items of Element sap.m.Table#__xmlview2--MyTable
I don't want to pass any template generated in JS code because I have defined the template in the XML view declaration!
So what's the solution in this case??
P.S. I'm using SAP UI5 1.28