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

Re: Can't read data from the model

$
0
0

Yura, the only explanation I have - somwhere in the code selectedFieldsCounter model is overwritten

 

btw, is line 1 always before line 2? to async conflict or anything?

 

try

 

var oSelectedFieldsModel = new sap.ui.model.json.JSONModel( {

  counter : 0

} ); 

sap.ui.getCore().setModel(oSelectedFieldsModel, "selectedFieldsCounter"); 

console.log("oninit(). ",oSelectedFields); //(1) 

 

 

var oSelectedFields = sap.ui.getCore().getModel("selectedFieldsCounter").getData(); 

console.log(oSelectedFields);//(2) 

 

in the same place


Viewing all articles
Browse latest Browse all 3273

Trending Articles



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