Quantcast
Channel: SCN: Message List - SAPUI5 Developer Center
Viewing all articles
Browse latest Browse all 8124

How to bind oDataModel to sap.ui.view

$
0
0

Hi,

 

How to bind oDataModel to sap.ui.view?

 

Below is my code, I am not sure how to proceed further in order to see my data in my view.

 

sap.ui.core.UIComponent.extend("sap.ui.demo.myFiori.Component", {

 

 

  createContent : function() {

 

 

  // create root view

  var oView = sap.ui.view({

  id : "app",

  viewName : "sap.ui.demo.myFiori.view.App",

  type : "JS",

  viewData : { component : this }

  });

 

var url = service + "/ES_GETSYS";//?$filter=Reqtyp eq 'FUL'";

var oModel = new sap.ui.model.odata.ODataModel(url, false, "user", "password");

oView.setModel(oModel);

return oView;

}

});

 

 

I got the error that ES_GETSYS is an entity set, not an entity type. So I removed the entity set and changed the above lines to:

 

var oModel = new sap.ui.model.odata.ODataModel(service, false, "user", "password");

oView.setModel(oModel);

return oView;

 

Now I don know how to bind the return data to oView?

 

Please help.

 

Best Regards,

Seyed Ismail MAC


Viewing all articles
Browse latest Browse all 8124

Trending Articles



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