Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 10449

Re: $count request does not send the custom headers specified in the oDATA Model

$
0
0

Hi Amardeep

 

if you don't need to know the count call set oModel( ).setCountSupported( false )

 

else, take a look at the following method which i believe does the count.

 

sap.ui.model.odata.ODataListBinding.prototype._getLength

https://sapui5.hana.ondemand.com/sdk/resources/sap/ui/model/odata/ODataListBinding-dbg.js

 

the headers aren't included in the jQuery.ajax call, not sure why, they are in the request from the model if you need them.

 

you could extend the method (locally) in the list binding to include headers

eg.

jQuery.ajax({          url: oRequest.requestUri,          async: oRequest.async,          cache: this.oModel.bCache,          headers: oRequest.headers,  //add this line          username: oRequest.user,          password: oRequest.password,          success: _handleSuccess,          error: _handleError
});

 

Cheers

John P


Viewing all articles
Browse latest Browse all 10449

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>