Skip to Content
0

[EASY] SAPUI5/HTML5, Display image throughout controler (MVC-XML)

Jun 18, 2017 at 04:12 PM

77

avatar image
Former Member

Hi Guys,

I would like to display my image via my xml controller but I got some trouble I guess with the path definition.

Below my project:

And my XML view:

Have you got any idea and explanation of why it's wrong ?

Thank you in advance.

1-vol.jpg (139.0 kB)
fake-img.jpg (101.5 kB)
10 |10000 characters needed characters left characters exceeded

In your index.html file on line 23 you have mentioned the value of the viewName property as "opensap.myapp.view.view" where the "v" of the view name is small-case, however under the view folder I can see that your view is named as View (with a capitalized "V"). Try changing line 23 as

 viewName : "opensap.myapp.view.View"
0
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Pavan Bhamidipati Jun 19, 2017 at 09:12 AM
0

Hi,

Check by replacing the resource roots as below

data-sap-ui-resourceroots='{"opensap.myapp": ""}'>

You can always view the errors in the project by opening the console from menu VIEW --> Console or by simply using the short cut CTRL + SHIFT + M

Thanks, Pavan

Share
10 |10000 characters needed characters left characters exceeded
Daniel Degraf
Jun 19, 2017 at 12:35 PM
0

Hi,

not sure if this will solve your issue, because we miss error messages that you can read/copy from the Browsers console. But I noticed a spelling mistake. Your views name is View, while you are using: opensap.myapp.view.view

Could you please check, if changing this to opensap.myapp.view.View solves this issue?

Thanks

Daniel

Share
10 |10000 characters needed characters left characters exceeded
Sharath M G Jun 19, 2017 at 11:48 AM
0

Error in the console - Ctrl + Shift + I in Chrome browser.

If you have created the project with "opensap.myapp" as namespace then this is fine. Remove the ./ in the value. '{"opensap.myapp": " "}'

Check the error in the console for the exact issue.

Regards,

Sharath

Share
10 |10000 characters needed characters left characters exceeded