Hello everyone,
First a quick look at my setup:
I have an application connected to an OData-Service as a backend. This OData-Service is bound to a table in my application.
The table is inside a IconTabBar. When switching between the IconTabs I want to apply different Filters and Sorters.
So when I switch from one tab to another I simply do this:
From Overview to Detail:
oFilter = new sap.ui.model.odata.Filter("Entryday" , [{ operator: "EQ", value1: oTime }]); //removing old sorter oBinding.sort([]); //adding new filter oBinding.filter(oFilter);
And switching back to Overview:
grouper = myApp.util.Grouper.Month; sorters.push(new sap.ui.model.Sorter("Entryday", true, grouper)); //removing the filters oBinding.filter([]); //adding the sorters oBinding.sort(sorters);
So in my Overview I have my "Entrydays" grouped by months, which is done by my Grouper.Month function and if I switch to the
Detail I only have all "Entrydays" of one month.
The Problem isn't that this does not work, it works perfectly fine, but when I look into the console of the browser, I recieve the following Error:
This happens after I add either the sorter oder the filter.
It doesnt happen if I dont remove the sorter oder the filter before, but then I don't get the wanted result.
How can I get rid of this error?
Thanks in advance for any help!
I also tried to use the "sap.ui.model.Filter" but had the same result...