0

I'm totally new to SAP UI5 and I'm keeping an image at images/ folder It's working fine in all environments but it's not showing up while opening from launchpad url.

Any clues. ?

Tried setting as below in index.html

data-sap-ui-resourceroots={ "sap.ui.demo.walkthrough": "./" }

Boghyon Hoffmann
  • 17,103
  • 12
  • 72
  • 170
Manu Janardhanan
  • 600
  • 4
  • 10

1 Answers1

0

This is a common error. It usually happens when SAPUI5 cannot resolve the URI in a deployed enviroment. (thus, getting 404 makes sense).

Try resolving your URI using this method.

Example.controller.js

that.getOwnerComponent().getManifestObject().resolveUri("relative/route/from/manifest.png")

Then, you can set up your image URI in a model and bind it to your view wherever you want. (oIcono is my image URI)

let oAuxModel = new JSONModel();
let oAuxObject = {
    oIcono: oIcono
};

View1.xml

<GenericTile ... headerImage="{TileModel>/oIcono}">