Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Not able to display image

Hello,

       I am beginner to sapui5.I was working on a small demo to display image.I have created folder VIEW in web contect and added the images to it.I have written following code.bit its showing error

i.e.Error: failed to load 'sap/m/sample/Image/ImageGroup.controller.js' from resources/sap/m/sample/Image/ImageGroup.controller.js: 404 - Resource could not be found!

my code:

<core:View xmlns:core="sap.ui.core"

  controllerName="sap.m.sample.Image.ImageGroup"

  xmlns:l="sap.ui.layout"

  xmlns:mvc="sap.ui.core.mvc"

  xmlns="sap.m">

  <l:VerticalLayout

    class="marginVerticalContent"

    width="100%">

    <l:content>

      <HBox>

        <Image

          src="view/apple-touch-startup-image-1496x2048.png"

          >

          <layoutData>

            <FlexItemData growFactor="1" />

          </layoutData>

        </Image>

       

      </HBox>

    </l:content>

  </l:VerticalLayout>

</core:View

please help me with this.

Thanks in advance.

Former Member
Former Member replied

check controller name.

it seems it should be

sample.Image

automatically it generates: [project name] + [initial view name]

1 View this answer in context
Not what you were looking for? View more on this topic or Ask a question