on 12-14-2015 10:36 AM
Dear Mentors ,
I am trying to place my custom app in the fiori in the launch pad,
The app loads the images and the local model data from the project folders perfectly fine , when the app is launched separately from the SAP server .
But when the same is launched from fiori launch pad , the resources are not loaded,
Not sure the coding has to be changed or any specific setting has to be done while configuring the app with FLP.
I have uploaded the example Fiori app to the SAP server and the project folder structure in SE80 is like below screen shot,
Kindly help on the same ,
Hi,
Am also facing same issue. In my app .css is getting loaded properly but image path is not working. Can any one pls tell me that how to include the images path in component.js . or is there any other way to achieve the same...
-Mahi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mahindran,
I have resolved my image and local json file issue by using the below code ,
// Image loading
var sRootPath = jQuery.sap.getModulePath("demo");
var sImagePath = sRootPath + "/image/photo1.png";
var image = new sap.m.Image({ src: sImagePath })
// Resource Bundle
var i18nModel = new sap.ui.model.resource.ResourceModel({ bundleUrl : [sRootPath, "i18n/messageBundle.properties"].join("/") });
oView.setModel(i18nModel, "i18n");
// Local Json file
var ojsModel = new sap.ui.model.json.JSONModel([sRootPath, "model/mock.json"].join("/"));
oView.setModel(ojsModel, "data");
Hope this helps ,
This would work as standalone UI5 application and embeded Fiori Launch pad app as well
Regards
Deepak
Hi Deepak,
Where are you specifying the libraries?
It could go as the metadata in your component.js file.
metadata : {
includes: [
"css/file1.css",
"css/file2.css",
],
libs: [ "sap.ui.commons", "sap.suite.ui.commons", "sap.ui.unified", "sap.ui.layout", "sap.ui.ux3"],
config: {
fullWidth : true
}
}
Refer this link ->SAPUI5 SDK - Demo Kit
Regards,
Naren L Naik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Naren ,
Thanks for replying,
For example , i have a folder called image under the WebContent folder of my project ,
I have an logo in the location image/Logo.png,
1) The same has been mentioned in my view as
var image = new sap.m.Image({ src: "image/Logo.png" })
2) And the index .html has a root folder set as below ,
data-sap-ui-resourceroots='{ "zflight_demo": "./" }'>
3) My component container i.e Component.js have been updated now with
metadata : { includes: [ "image/" ],
Still the logo is not loaded from Launch pad , but the same seems to be working fine from eclipse or SAP server as standalone application ,
Could you please guide me with some steps , thank for your help in advance .
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.