Can I use/bind a value from a first JSON Model in a second JSON Model? In the example below the text of the first item in the second model (MyNamedModel) should be 'Apple'.
Complete example can be found here: https://plnkr.co/edit/WtStoqxsjUAfC9Ia
var oFruits = {
first: "Apple",
second: "Banana"
}
var oFruitModel = new JSONModel(oFruits);
this.getView().setModel(oFruitModel, "FruitModel");
var oData = {
"items": [
{ Key: "A",
Text: "{path: '/FruitModel>/first'}",
Icon: "sap-icon://nutrition-activity"
},
{ Key: "B",
Text: "Paper Plane",
Icon: "sap-icon://paper-plane"
},
{ Key: "C",
Text: "Vacation",
Icon: "sap-icon://general-leave-request"
}
]
};
var oMyModel = new JSONModel(oData);
this.getView().setModel(oMyModel, "MyNamedModel");
Use case: In reality I have a geoMap control where the mapConfiguration is in a JSONModel and I would like to get one specific parameter value (URL) from the backend and use it in the mapConfiguration.