Skip to Content
avatar image
Former Member

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

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)
Add comment
10|10000 characters needed 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"
  • Get RSS Feed

3 Answers

  • Jun 19, 2017 at 09:12 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 19, 2017 at 12:35 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 19, 2017 at 11:48 AM

    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

    Add comment
    10|10000 characters needed characters exceeded