on 05-04-2015 6:19 AM
Hi Everyone,
I am Vinothkumar new to SAP ui5 frontend development so please help me to learn this..
How to pass the two oData content to the next screen using the press event. The first oData content will show in the header and the second oData content will show in the list item.
Hi Vinoth,
You can pass values from one view to other as shown below.
View 1 controller
Before navigating to other view you can use below command to set a model.
sap.ui.getCore().setModel(View1Model,"View1Model");
View2 controller
Now in this 2nd view inside below std. function, you can access the data from the model.
_handleRouteMatched:function(evt){
var View2Model = sap.ui.getCore().getModel("View1Model");
}
Now this var View2Model can be accessed in other functions of this controller.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Aakash,
when i press a list i want to call two oData. Now i complete for first oData it shows the data in the next view in that same view i want show the next oData content.
listpress1:function(oEv){
var control=oEv.getSource().getContent()[7].getText();
var url3="proxy/http/static-71-170-170-213.dllstx.fios.verizon.net:8000/sap/opu/odata/sap/ZCUSTOMER_COLLECTIONS_SRV/CUST_BILLING_HEADER/?$filter=Billing eq '"+control+"'";
var oModvoi=new sap.ui.model.odata.ODataModel(url3,false,"supervisor","welcome1");
oModvoi.read('',null,null,true,function(oData,oResponse){
var oModelv=new sap.ui.model.json.JSONModel();
oModelv.setData(oData);
sap.ui.getCore().setModel(oModelv);
page4.setModel(oModelv);
});
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.