Skip to Content
0

Passing Filter parameter in bindElement of view

Mar 20, 2017 at 09:14 AM

90

avatar image

Hello Folks,

I am trying to pass filters in bindElement method of a view as shown in blow code. This does not work. And also, in the parameters, it accepts only expand and select. Could you please let me know how to pass the filters.

this.getView().bindElement({

path: sObjectPath,

parameters: {

expand: sExpand

},

filters: [new sap.ui.model.Filter(sFieldName, "EQ", sValue)],

events: {

change: this._onBindingChange.bind(this),

dataRequested: function() { },

dataReceived: function(oData) { }

} });

Best Regards

Srini

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Krishna Kishor Kammaje
Mar 21, 2017 at 06:20 AM
-1

By Looking into the documentation, it looks like $filter is supported only with OData V4 model.

For V2, I would suggest trying to put it in the URL itself. (path)

Share
10 |10000 characters needed characters left characters exceeded