Skip to Content
Jan 30, 2019 at 01:13 PM

SAPUI5 adapt project from easily



I'm facing the following issue :

most of the time when I asked question about solution for my web ide project or when I searched with keyword on google, answer is the same : you may use model from

yes maybe that's the way but when functionnality is a complex one such as updatecollection, or pdf viewer embedded solution,

I don't know how to adapt my project displayed as a tree with a lot of files with the model which never contains a manifest.json for example.

is there an easy way to do that ?

for example

I tried to copy 2 out of three models, and tried to adapt them with odata path without success...

I tried to replace

var oSample1Model = new JSONModel({
				Source: sap.ui.require.toUrl("sap/m/sample/PDFViewerPopup") + "/sample1.pdf",
				//	Preview: sap.ui.require.toUrl("sap/m/sample/PDFViewerPopup") + "/sample1.jpg"

with odata model :, {
				success: function (oRetrievedResult) {
					var oSample1Model = new JSONModel({
						Source: sap.ui.require.toUrl(gatewayUri) + oRetrievedResult.Url
					//	this.byId('image2').setModel(oSample2Model);

message displayed says that metadata couldn't be loaded.

it seems natural since I didn't declare model in manifest.json since no such file exists...