cancel
Showing results for 
Search instead for 
Did you mean: 

sap.ui.model.odata.v2 OperationMode = Client Not working

Former Member
0 Kudos

Hi All

I have created a simple master detail UI5 app with a single Model.

I set the operation mode to Client in the manifest for the UI5 app.

I then expect the app to behave in the following way:

1. When the app is opened an oData call is made to the server to get the data for the master List.

2. When I then search the Master List using the search input I don't expect any further odata calls as I have set the default OperationMode of the Model to Client.

But I am getting oData calls to the server every time I search the list.

The definition of OperationMode = Client is below:

"Operations are executed on the client, all entries must be available to be able to do so. The initial request fetches the complete collection, filtering and sorting does not trigger further requests."

I can see my initial call loads all the data required and I use an inline count.

Am I missing something?

Has anyone else been able to use a default OperationMode = Client on a Master Detail app.

Any ideas/thoughts greatly appreciated.

Am going to try debugging to see what is going on 🙂

Thanks

Andrew

Accepted Solutions (1)

Accepted Solutions (1)

saurabh_vakil
Active Contributor
0 Kudos

Hello Andrew,

I have tried building an app in Web IDE using the master detail template and set the Operation Mode as Client, Binding Mode as TwoWay and Count Mode as Inline. With these settings when I do a search in the master list I do not see any network call being triggered in the Network tab of the developer console and I see the search result returned successfully.

Regards,

Saurabh

Former Member
0 Kudos

Hi Saurabh

Thanks you put me on the right track.

So this is what I found.

The app I created was imported from BUILD, and it created code that used the following for search input.

oControl.bindAggregation("items", {
		path: oBindingInfo.path,
		template: oBindingInfo.template,
		sorter: oBindingOptions.sorters,
		filters: oBindingOptions.filters 
});

I then created a new app using the template like you suggested and it uses the following code for search input.

oControl.getBinding("items").filter(aFilters, "Application");

So I moved the code for searching from the template app into my BUILD app and now it works!!!!

So it must be something relating to using the bindAggregation method that was added by BUILD.

Cheers

Andrew

saurabh_vakil
Active Contributor
0 Kudos

Thanks for letting us know exactly how you have overcome the issue!

Answers (0)