Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 3523

JSON model error in another view when refreshing browser

$
0
0

Hi,

 

 

I have created a JSON model and bind the same into sap.ui.getCore().setModel.

 

var json = {};

json.plant = plant;

json.sloc = sloc;

json.material = material;

this.materialset.setData(json);

sap.ui.getCore().setModel(this.materialset,"materialset");

 

 

and the same is accessed in other view

 

var materialset=sap.ui.getCore().getModel("materialset");

var mSet=materialset.getData()

var fplant=mSet.plant;

var fsloc=mSet.sloc;

var fmat=mSet.material;

 

Im able to get all the data from JSON model.

 

But when i refresh the browser from 2nd view, its throwing error message in

 

materialset.getData()

 

It seems the data which I passed from 1st view got removed by browser refresh.

 

Wont it be reside in object even after browser refresh or is it the usual functionality ?

 

I need to get the values even after page refresh. help me to get a solution.

 

Thanks

Yokesvaran Kumarasamy


Viewing all articles
Browse latest Browse all 3523

Trending Articles



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