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
- sap.ui.getCore().setModel(oModel, "MyJSONData") //it is not binding data to label
but when I write
- this.getView().setModel(oModel, "MyJSONData") // It is binding data to label
I have binded as
- controls.push(new sap.ui.commons.Label({
- text:{
- parts:[{path:"MYJSONData>/title"}],
- formatter: function(title)
- {
- //will do some formatting and return formatted title
- }
- }
- }));