Skip to Content
3

Images not showing in SAPUI5 application after deployed in FIORI launchpad.

Dec 27, 2016 at 12:52 PM

1.3k

avatar image
Former Member

Hi,

I'm working in SAPUI5,

I have images in folder like structure

and in App.xml i wrote code like,

while running as web application and in sandbox it showing images

but in launchpad it not showing images.

Please help me on this.

Thanks and regards,

Ajit B.

imgstru.png (3.2 kB)
imgstrucode.png (7.9 kB)
imgstrucode.png (7.9 kB)
webappimage.png (12.6 kB)
flpimage.png (14.3 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Ugur Kaya Feb 02, 2017 at 06:59 AM
4

Hey Ajit & Jay,

If you are running your application on the launchpad and having root problems:

Try this in your component.js onInit()

Basically we create a model to get resource root of the application when we want to display images

var oRootPath = jQuery.sap.getModulePath("com.kaya.app001"); // your resource root
		
var oImageModel = new sap.ui.model.json.JSONModel({
	path : oRootPath,
});
		
this.setModel(oImageModel, "imageModel");

Change your image source according to this:

<Image src="{imageModel>/path}/test-resources/Icons/twitterIcon.png" />

Regards

Ugur

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Feb 02, 2017 at 04:19 AM
0

Did you find the answer to this?

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

I had the same issue - the images work fine running the application from HCP but are not working when launching from the Fiori launchpad.

0