Quantcast
Viewing all articles
Browse latest Browse all 8372

Re: setting Model to sap.ui.getCore not working

Hi Padma,

I think you are not getting my problem.
I have set model with some name, in my case it is "MYJSONData"

 

so when I write

  1. sap.ui.getCore().setModel(oModel, "MyJSONData"//it is not binding data to label

but when I write

  1. this.getView().setModel(oModel, "MyJSONData"// It is binding data to label


I have binded as



  1. controls.push(new sap.ui.commons.Label({ 
  2.                     text:{ 
  3.                               parts:[{path:"MYJSONData>/title"}], 
  4.                               formatter: function(title) 
  5.                                    { 
  6.                                         //will do some formatting and return formatted title 
  7.                                      } 
  8.                            } 
  9.                })); 



Viewing all articles
Browse latest Browse all 8372

Trending Articles



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