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

Re: getModel() is not working

$
0
0

Hi PS,

 

You have to set the model to the global context then you can retrieve

 

var oModel = new sap.ui.model.json.JSONModel();            oModel.setData({          "firstName": "Peter",          "lastName": "Pan"      });                        //set the model            sap.ui.getCore().setModel(oModel);                        //get the model            sap.ui.getCore().getModel().oData; // Returns the data

 

    

 

Regards,

Ajain


Viewing all articles
Browse latest Browse all 8652

Trending Articles



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