Quantcast
Channel: SCN : All Content - SAPUI5 Developer Center
Viewing all articles
Browse latest Browse all 6178

bindelement method does not send out OData service request

$
0
0

Hi,

    There is a weird behavior in our application that sapui5 does not make OData service request (I use Chrome to monitor network activity)

as we try to bindelement with a particular entity.

 

We are able to make OData service request against NW Gateway to retrieve a collection.

(create ODataModel instance and make it global by using sap.ui.getCore().setModel(myODataInsance)

and then  a sap.m.List calls  bindAggregation method with /Courses  path to get Courses collection)

Everything seems fine.  However as we try to calll bindElement and do something like this 

oControl.bindElement(

"/Courses('123456')/")    It seems looking into OData model in the memory (no request is out)  The problem is

the collection does not have course detail information.

I hadcode the course id with a random number and then I can see the request is out.  (but of course it will return 400 since the course id does not

exist). 

The temporary solution in our side is to create a new ODataModel (so. no calling collection first) and then oControl to bind element.

However I think they are using the same service so it does not make much sense to use two ODataModel instance.  Any thought we may

do something wrong?

 


Viewing all articles
Browse latest Browse all 6178

Trending Articles



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