on 01-30-2019 1:13 PM
Hi,
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 sapui5.hana.ondemand.com.
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 https://sapui5.hana.ondemand.com/#/entity/sap.m.PDFViewer
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 :
odataModel.read(sPath, {
success: function (oRetrievedResult) {
debugger;
var oSample1Model = new JSONModel({
Source: sap.ui.require.toUrl(gatewayUri) + oRetrievedResult.Url
});
oPdfViewer.setModel(oSample1Model);
// 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...
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
don't know what you are talking.....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.