Skip to Content

Background image is not set to App when launched in fiori launchpad

Hello Experts,

I have created an app, and set the backgroundImage property. The image happens to sit in the 'images' folder. Now I have tried several ways to achieve it. If you see below, I have mentioned the ways. Both ways work fine when accessing the app through link that we after deploying to HCP. The issue arises only when the app to registered to FLP and is accessed from therein. Way 2 is used before deploying app to FLP. What am i missing ?

Way 1: backgroundImage="images/image.jpg"

Way 2:

var oRootPath = jQuery.sap.getModulePath("namespace.images");
var oImageModel = new sap.ui.model.json.JSONModel({
path: oRootPath
});
this.getView().setModel(oImageModel, "imageModel");
//in xml view
backgroundImage="{imageModel>/path}/image.jpg"
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Apr 28 at 12:49 PM

    what does network tab say?

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 30 at 06:54 AM

    Check this archive answer .. Might this is what you are facing ..

    https://archive.sap.com/discussions/thread/3864422

    Thanks

    Viplove

    Add comment
    10|10000 characters needed characters exceeded

    • Hello Viplove,

      Tried this approach already. Funny part is the image seems to be rendered first. Later it vanishes. Got it resolved by setting Page property backgroundDesign="Transparent".

  • Apr 29 at 07:27 AM

    304 status means redirect. it means application tried to load the image from the cache. try to clear the cache and run the application in private browsing.

    Regards,

    Meghal Shah

    Add comment
    10|10000 characters needed characters exceeded

  • May 02 at 07:10 AM

    Hello peeps,

    Funny part is the image seems to be rendering first. Later it vanishes. After scratching head for a while, got it resolved by setting Page property backgroundDesign="Transparent". Thanks a ton for giving your precious time.

    Add comment
    10|10000 characters needed characters exceeded