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

Re: Passing variables from one view to other.

$
0
0

If you are using JS views then in the first view set the model to the core as

sap.ui.getCore().setModel(oDataModel1, "model1");

 

In the second you can get the same model by writing

sap.ui.getCore().getModel("model1");


If you are using XML views then it is not possible to fetch the model in second view using above code. In this case you will have to declare your model in Component.js - then it becomes globally available. Set the values in this model from first view and then fetch the model and the values in the second view.


Viewing all articles
Browse latest Browse all 2069

Trending Articles



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