Skip to Content
0
Apr 28, 2018 at 11:42 AM

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

1543 Views

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"