Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 845

SAPUI5:Unable to get oData model to work

$
0
0

Hi ,

 

I am trying to get the data from oDataModel before it gets bound to the list  , in the view  .I have tried to set my model in the attach request completed delegate method.

 

appC.oModel.attachRequestCompleted(function(evt){

                              alert("Request Completed" + "--");

                        var name = sap.ui.getCore().getModel().getData();

                                    console.log(name);

                                   });

 

I am invoking the REST service using oData Model constructor:

 

appC.oModel = new sap.ui.model.odata.ODataModel(sServiceUrl1,false, "usr", "pwd" , mHeaders);

 

 

I am expecting  variable name should have , the data of the collection , but I am always getting null.

 

Regards

Nidhideep Bhandari


Viewing all articles
Browse latest Browse all 845

Trending Articles



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