cancel
Showing results for 
Search instead for 
Did you mean: 

LayoutData causes ResourceException

Former Member
0 Kudos

Hello everyone,

I try to display some data via a Grid Layout and the use of LayoutData causes following exception:

Uncaught Error: failed to load 'sap/m/layoutData.js' from resources/sap/m/layoutData.js: 404 - Resource could not be found!

My sap-bootstrap looks like this:


<script

  id="sap-ui-bootstrap"

  src="resources/sap-ui-core.js"

  data-sap-ui-theme="sap_bluecrystal"

  data-sap-ui-libs="sap.m"

  data-sap-ui-xx-bindingSyntax="complex"

  data-sap-ui-resourceroots='{

  "com.parcon.logixnet.tourman": "./"

  }' >

</script>

My view looks inpired by SAPUI5 Explored looks like this (problem line 15-17):


<core:View

  controllerName="com.parcon.logixnet.tourman.controller.SubDetail"

  xmlns:l="sap.ui.layout"

  xmlns="sap.m"

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

  <Page

  title="{empfaenger}"

  showNavButton="true"

  navButtonPress="handleNavButtonPress" >

  <l:Grid

  class="gridMarginTop"

    defaultSpan="L6 M6 S6">

    <l:content>

    <Label text="adresse" design="Bold"/>

         <layoutData>

           <l:GridData span="L12 M12 S12" />

         </layoutData> 

         <Text text="ort"/>

         <Text text="{adresse/0/ort}" />

    </l:content>

      </l:Grid>

  

  <Panel>

    <headerToolbar>

       <Toolbar height="3rem">

         <Text text="{i18n>Adresse}"/>

       </Toolbar>

     </headerToolbar>

     <content>

       <Text text="sampleText"/>

     </content>

    </Panel>

  </Page>

</core:View>

My sap.ui.version is 1.22.7 and I can't find the problem.

Any help is appreciated, Thanks,

Silvio.

Accepted Solutions (1)

Accepted Solutions (1)

former_member189945
Contributor
0 Kudos

Hi Silvio,

Try to add namespace core before layoutData:


<core:layoutData> 

<l:GridData span="L12 M12 S12" /> 

</core:layoutData>


Regards,

Kimmo

former_member189945
Contributor
0 Kudos

Or actually I think it should be "l" instead of "core"

Former Member
0 Kudos

Hello Kimmo,

is doesn't help. Still exceptions. BTW: I can't find any matching js-Lib in my sapui5 js libraries in my eclipse-project resources.

Are there any other ideas?

former_member189945
Contributor
0 Kudos

You seem to have closing tag on Label:


<Label text="adresse" design="Bold"/>

Try to move the closing tag </Label> after layoutdata.

Regards,

Kimmo

Former Member
0 Kudos

Once again, Thank You. And the solution for following generations:


<Label text="adresse" design="Bold">

  <layoutData>

       <l:GridData span="L12 M12 S12" />

  </layoutData>

</Label>

Answers (0)