Skip to Content

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...

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    Posted on Feb 05, 2019 at 09:21 AM

    Hi Jun and Mahesh,

    my question was much generally speaking and not with a specific example :

    how to simply adapt a web ide project with samples from sapui5 library ?

    when example is a little bit complicated I can't adapt it to my oData model.

    it is the case with pdfviewer, attachment.

    finally with help from friends who know javascript better than me, I succeeded in using pdfviewer, but not the attachment one.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 30, 2019 at 01:25 PM

    don't know what you are talking.....

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.