on 2017 Jul 31 8:18 AM
Hi Team,
I am facing a weird issue. I have a table with JSON model and data is retrieveing during Init of the application. I have a custom filter for the table. When I enter the value it is filtering the values properly for the first time. on the second time when I do it, it always filters based on the filtered value and not the original model.
Upon checking thethis.getView().byId(tabname).getBinding("items"), I found that oList is getting refreshed with filtered values.
Could you please provide some hints on this behaviour and how to stop it?
The logic to filter is working for other table in the same application. Just one table is causing issue...
My code to filter.
var oFilter = null ;
if (fValue)
{ oFilter = new sap.ui.model.Filter("ColumnA", sap.ui.model.FilterOperator.Contains, fValue); }
var binding = this.getView().byId("Table1").getBinding("items");
binding.filter(oFilter,sap.ui.model.FilterType.Application);
binding.refresh(true);
Request clarification before answering.
Issue resolved. The problem was with setting the count of the icontabfilter. When setcount method is used to show the updated result, it creates the above issue. Removed the code and coded differently to show the filtered result count.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.