on 06-26-2019 2:35 AM
Dear All,
how to pass value of CatID which defined in onSelect funtion in master.controller.js into detail.view.js or detial controller?
i just want to get CatID in detail.view...
please help me.
[master.controller.js]
onInit: function () {
var oData = { "names": [ { CatID: "SD", CatName: "Sales", CatDesc: "Sales etc..." }, ] }
var oModel = new sap.ui.model.json.JSONModel();
oModel.setData(oData);
sap.ui.getCore().byId("idHdr").setModel(oModel);
},
onSelect: function (oEvent) {
// ID
var oContext = oEvent.getParameter("listItem").getBindingContext();
var CatID = oContext.getProperty("CatID");
console.log(CatID) is working good
.
.
}
[Deatil.view.js]
how to get CatID ????
Thank you in advance
David.
put the data in model, and save the model at component level, which make the model shared across view controller
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Benjamin,
Take a look at the following tutorial:
Routing with paramters:
Kind regards,
Dries
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.