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

DataBinding: How to set BindingContext?

$
0
0

Hey guys,

 

I have following JSON:

 

"customers": [

{

  "name": "Meyer",

  "first_name": "Hans",

  "order" : [

  {

  "article_number" :"123456",

  "description" :"Deo"

  }

  ]

},

 

I want to set the BindingContext for my control with this method:

setBindingContext(oContext, sName?)

 

How can i create object oContext?

 

I tried following, but its not working:

 

var oModel = this.getView().getModel("ModelKundenInfos");

var sPath = "/customers/0";

var context2 = {oModel : oModel, sPath : sPath};

 

Thanks + regards

 

Chris


Viewing all articles
Browse latest Browse all 6178

Trending Articles



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