Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Client" side filtering is not working while working with sap.ui.model.odata.V2.ODataModel model #1847

Closed
imsuman opened this issue Jan 13, 2018 · 1 comment

Comments

@imsuman
Copy link

imsuman commented Jan 13, 2018

OpenUI5 version:1.48.4

Browser/version (+device/version):Chrome/61.0.3163.100(Desktop/Windows10)

Any other tested browsers/devices(OK/FAIL):FAIL

URL (minimal example if possible):

User/password (if required and possible - do not post any confidential information here):

Steps to reproduce the problem:

  1. Use the OData Model(V2) and apply search in worklistapp(demoapp)
  2. this._oTable.getBinding("items").filter(oTableSearchState, "Client")
    Here OData model has been bound to the controllers

What is the expected result?
after clicking the enter button on search field client should not request to back-end system the filtering of data should be happened in client level only
What happens instead?
it requests a trip to back-end.
Any other information? (attach screenshot if possible)

@pavelkornev
Copy link
Member

"Client" is not valid argument for filter function of ListBindign - https://sapui5.hana.ondemand.com/#/api/sap.ui.model.odata.v2.ODataListBinding

You should specify "client" as operation mode for your whole model or for list binding like this:

new sap.ui.model.odata.v2.ODataModel(serviceUrl, {
	operationMode: sap.ui.model.odata.OperationMode.Client
})
or
oModel.bindList('/path', {
	operationMode: sap.ui.model.odata.OperationMode.Client
})
or
oTable.bindItems({
	path: '/path',
	operationMode: sap.ui.model.odata.OperationMode.Client
})

https://sapui5.hana.ondemand.com/#/api/sap.ui.model.odata.v2.ODataModel/methods/bindList

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants