cancel
Showing results for 
Search instead for 
Did you mean: 

Why is /resources concatenated?

john_heutmekers2
Participant
0 Kudos

I'm developing a Fiori app, using the following XML view:


<mvc:View

  controllerName="ZNI_PPM_PROJECT_TASKS.view.Detail"

  xmlns="sap.m"

  xmlns:form="sap.ui.layout.form"

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

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

  <Page

  title="{i18n>DETAIL_TITLE}"

  class="sapUiFioriObjectPage" 

  showNavButton="{device>/isPhone}"

  navButtonPress="handleNavButtonPress">

  <ObjectHeader id="header"

  title="{TaskText}"

  number="{Overdue}"

  numberUnit="{OverdueUnitText}">

  </ObjectHeader>

  <IconTabBar id="IconTabBar">

  <items>

  <IconTabFilter icon="sap-icon://hint" id="InfoTab" key="Info">

  <content>

  <core:mvc.XMLView id="InfoView" viewName="view.Information"/>

  </content>

  </IconTabFilter>

  </items>

  </IconTabBar>

  <footer>

  <Bar>

  <contentRight>

  <Button id="actionButton" icon="sap-icon://action" press="openActionSheet"></Button>

  </contentRight>

  </Bar>

  </footer>

  </Page>

</mvc:View>

When this view is parsed I get the following error:

GET http://xxxxxxxxxx:8000/sap/bc/ui5_ui5/sap/zni_ppm_prj_tsk/resources/view/Information.view.xml 404 (NOT FOUND).

The view however is located in the view folder in the root. Why is /resources concatenated to the url?

Kind regards,

John.

Accepted Solutions (1)

Accepted Solutions (1)

kammaje_cis
Active Contributor
0 Kudos

This has to do with namespaces.

Replace

<core:mvc.XMLView id="InfoView" viewName="view.Information"/>


By

<core:mvc.XMLView id="InfoView" viewName="ZNI_PPM_PROJECT_TASKS.view.Information"/>

john_heutmekers2
Participant
0 Kudos

Hello Krishna,

Thanks for your quick response. I have changed the imbedding of the view:

<core:mvc.XMLView id="InfoView" viewName="ZNI_PPM_PROJECT_TASKS.view.Information"/>

But now another similar error occurs for the controller:

GET http://xxxxxxx:8000/sap/bc/ui5_ui5/sap/zni_ppm_prj_tsk/resources/view/Information.controller.js 404 (NOT FOUND) sap-ui-core.js:27

Uncaught Error: failed to load 'view/Information.controller.js' from resources/view/Information.controller.js: 404 - NOT FOUND

Kind regards,

John.

kammaje_cis
Active Contributor
0 Kudos

Now, you need to see inside the view '.Information'.

There you will be mentioning the controller name similarly.

controllerName="ZNI_PPM_PROJECT_TASKS.view.Information"

Answers (0)