The filter using below code is not working. I created an application using a template from Web IDE and then bound OData to the list in XMLView, applying filter on search.
View:
<SearchField liveChange="onSearch" id="master1SearchField" search="onSearch"/>
<List id="master1List" items="{path:'/DetailsSet'}">
<items>
<ObjectListItem id="master1ListItem">
<attributes>
<ObjectAttribute text="{Name}"/>
</attributes>
</ObjectListItem>
</items>
</List>
Controller:
onSearch : function(oEvent) {
var sFilteredValue = oEvent.getSource().getValue();
var oFilter = new sap.ui.model.Filter("Name", sap.ui.model.FilterOperator.Contains, sFilteredValue);
var oElement = this.getView().byId("table");
var oBinding = oElement.getBinding("items");
oBinding.filter([oFilter]);
}