on 10-27-2015 12:55 AM
hello everyone,i hava a problem when i write follow code;
var oList=this.getVIew().byId("list");
var oBinding=oList.getBinding("items");
oBinding.filter(aFilters);
i hava searched API for "sap.m.List", and found method "getBinding",the method return "sap.ui.mode.Binding";
then i searched API for sap.ui.model.Binding, but i cant not find the method of filter,does anyone know something about it?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Lan,
The Binding is the object, which holds the necessary information for a data binding, like the binding path and the binding context, and acts like an interface to the model for the control, so it is the event provider for changes in the data model and provides getters for accessing properties or lists.
Filter: It is a Javascript core property to filter the item from an array.
For ex:
The filter() method returns elements that match a certain criteria.
This method lets you specify a criteria. Elements that do not match the criteria are removed from the selection, and those that match will be returned.
This method is often used to narrow down the search for an element in a group of selected elements.
Tip: The filter() method is the opposite of the not() method.
Thanks,
KA
Hi LAN,
Not sure, why it is not documented in sap.ui.model.Binding . Since, it is a abstract class I checked the base class sap.ui.model: JsDoc Report - SAP UI development Toolkit for HTML5 - API Reference - sap.ui.model
And there is a List Binding, where this .filter() method is available: JsDoc Report - SAP UI development Toolkit for HTML5 - API Reference - sap.ui.model.ListBinding
Regards,
Sai Vellanki.
and yes, sdk's api reference is not full, that's why i encourage all develeoprs to go and check sources
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
you dont see it because it is ListBinding
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 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.