Skip to Content
0

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

Apr 28 at 11:42 AM

300

avatar image

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"
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Jun Wu Apr 28 at 12:49 PM
0

what does network tab say?

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hello Jun,

Thanks for responding...

The file is bg.jpg.

status shows 304

here is the snapshot

networkres.png (2.6 kB)
0
VIPLOVE KHUSHALANI Apr 30 at 06:54 AM
0

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

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

Thanks

Viplove

Show 1 Share
10 |10000 characters needed characters left 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".

1
MEGHAL SHAH Apr 29 at 07:27 AM
0

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

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hello Meghal,

Tried that as well but no luck.

0
Akshay Tamhane May 02 at 07:10 AM
0

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.

Share
10 |10000 characters needed characters left characters exceeded