Skip to Content
author's profile photo Former Member
Former Member

SAPUI5 App resources not loaded from fiori Launch Pad

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 ,

Fiori Resources.png (106.6 kB)
Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Feb 14, 2016 at 04:55 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      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

  • author's profile photo Former Member
    Former Member
    Posted on Dec 14, 2015 at 10:49 AM

    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

    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.