Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

how to process passed data from another view?

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

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question