Skip to Content
avatar image
Former Member

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Jan 06, 2015 at 11:53 AM

    check controller name.

    it seems it should be

    sample.Image

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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 06, 2015 at 11:59 AM

    Thank you.

    Add comment
    10|10000 characters needed characters exceeded