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

Is it possible to set multiple models to the core?

$
0
0

hi all

is it possible to set multiple models ( json or odata) to the core by saying

 

sap.ui.getCore().setModel(oModel,"oModel");

 

sap.ui.getCore().setModel(jsonModel,"jsonModel" );

so these can be referenced any other controller classes as required. I am setting these 2 models to the core, but while accessing the json model later on, it always returns undefined

 

var jsonModel = sap.ui.getCore().getModel('jsonModel');

 

the jsonModel returned here is always undefined.

 

Regards, Aakash


Viewing all articles
Browse latest Browse all 6178

Trending Articles



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