Hello,
how can I put the Model (Section "models") in a ComBox ?:
manifest.json
....
"models": {
"i18n": {
"type": "sap.ui.model.resource.ResourceModel",
"settings": {
"bundleName": "versuch1.i18n.i18n"
}
},
"": {
"dataSource": "mainService",
"preload": true,
"settings": {}
},
"MyModel2": {
"dataSource": "Service1",
"preload": true,
"settings": {}
},
"MyModel3": {
"dataSource": "Service2",
"preload": true,
"settings": {}
}
Code:
// file is fully loaded into the JSON modelvar aData = that.getView().getModel("Manifest").getData();
var aManifest_sap_ui5 = aData["sap.ui5"];
var aManifest_models = aManifest_sap_ui5["models"];
var oCoMBoxManModels = that.getView().byId("idCoMBoxModelMan");
// hier the problem, cannot read aManifest, ist not array ?
for (var i = 0; i < aManifest_models.length; i++) {
var newItem = new sap.ui.core.Item({
key: aManifest_models[i] ,
text: aManifest_models[i]
});
oCoMBoxManModels.addItem(newItem);
}
// hier the problem, cannot read aManifest, ist not an array ?

How can I loop over the first element "", "MyModel2" , "MaModel3" .... ?
(I don't "know" nams of models, its should be get dynamic)
Thanks !
Greg