Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Not able to display image

Former Member
0 Kudos

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.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

check controller name.

it seems it should be

sample.Image

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

2 REPLIES 2

Former Member
0 Kudos

check controller name.

it seems it should be

sample.Image

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

Former Member
0 Kudos

Thank you.