on 02-13-2014 4:28 PM
Hi,
I'm trying to sort the items of a list control (sap.m.List) like following within the controller of the view:
var oBinding = this.getView().byId("list").getBinding("items"); | ||||||
oBinding.sort(new sap.ui.model.Sorter("value", true, false)); | ||||||
The ListBinding is returned successfully, but the sort does not work.
For test reasons I bound a collection of an ODataModel. The data is retrieved from a Json file using the UI5 MockServer.
I also have implemented a filter (oBinding.filter(...) which works.
What I'm doing wrong?
Thx.
This message was moderated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Did you check if the sort() creates a request in your Network tab ? Can you also check the response you've got for the request ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Please find below the working example for sorting and filtering.
Data binding test page for sorting and filtering
Right click on the page and View page Source.
Hope it helps
Regards,
Jeffin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
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.