on 04-28-2018 12:42 PM
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"
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Check this archive answer .. Might this is what you are facing ..
https://archive.sap.com/discussions/thread/3864422
Thanks
Viplove
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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".
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
what does network tab say?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.