cancel
Showing results for 
Search instead for 
Did you mean: 

oList is changed after applying Filter

Former Member
0 Kudos
733

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);
View Entire Topic
Former Member
0 Kudos

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.