SAPUI5 Two oData Datasources within manifest / descriptor -
i'm using sapui5 version gt 1.30 , try define automatic model instantiation of 2 external services within manifest.
my first question is, more 1 odata services allowed? sorry, i'cant find out documentation.
the default datasource ("") works. second datasource ("hla") not. if more once allowed, please right definition.
"sap.app": "datasources": { "mainservice": { "uri": "path.xsodata/", "type": "odata", "settings": { "odataversion": "2.0", "localuri": "localservice/metadata.xml" } } "secondservice": { "uri": "/path.......xsodata/", "type": "odata", "settings": { "annotations": [], "odataversion": "2.0", "localuri": "" } } }, "sap.ui5": "models": { "i18n": { "type": "sap.ui.model.resource.resourcemodel", "settings": { "bundlename": "....i18n.i18n" } }, "": { "datasource": "mainservice", "settings": { "metadataurlparams": { "sap-documentation": "heading" } } }, "hla": { "datasource": "secondservice", "settings": { "metadataurlparams": { "sap-documentation": "heading" } } } } thanks lot!
of course can have more 1 data source, recommended fiori guidelines use one.
do want address path.......xsodata/ ?
also think should remove localuri second data source. because if there no metadata document might throw arror.
"secondservice": { "uri": "/proxy/service.xsodata", "type": "odata", "settings": { "odataversion": "2.0" } } what output of debugger? error? odata model should have type.
"hla": { "datasource": "secondservice", "type": "sap.ui.model.odata.v2.odatamodel" }
Comments
Post a Comment