Quantcast
Channel: SCN: Message List - SAPUI5 Developer Center
Viewing all articles
Browse latest Browse all 8124

how to process passed data from another view?

$
0
0

hi,

iam performing an odata read from controller of ,say view1 and passing data to another view like below

 

OData.read({ requestUri:

  "url",

 

  headers: { "X-Requested-With": "XMLHttpRequest", "sap-user" : username, "sap-password" : password,  "Content-Type": "application/atom+xml" },

 

   },

   function (data) {

   var oModel = new sap.ui.model.json.JSONModel();

   var myData = {};

 

   myData.Products = data.results;

   oModel.setData(myData);

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

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

   sap.ui.core.BusyIndicator.hide();

  //  sap.ui.getCore().getModel("mydashboardModel").updateBindings(true);

 

 

  

    app.to("Dashboard",data); 

   },

  

   

   function(err){

  // window.alert("error: "+ err.message);

  // bsydialog.close();

  sap.ui.core.BusyIndicator.hide();

             window.alert("error");

   }

  );

 

how to access or just print the mydata array in another view called view2


Viewing all articles
Browse latest Browse all 8124

Trending Articles



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