on 03-01-2014 5:36 AM
Hello everyone,
I m building a small project using Open UI5 and I m having some issues with file structure.
The structure is like this.
<project>/library/open_ui5/sap-ui-core.js
The below works
<project>/library/open_ui5/<app_js>/xyz.view.js
But I want to have something like this.
<project>/js/<app_js>/xyz.view.js
Following is the code so far.
index.html
<script id='sap-ui-bootstrap'
src='{$app_url}library/open_sap_ui5/sap-ui-core.js'
data-sap-ui-theme='sap_goldreflection'
data-sap-ui-libs='sap.ui.commons,sap.ui.table'></script>
index.js
var view = sap.ui.view({id:"id_tracker.main", viewName:"tracker.main", type:sap.ui.core.mvc.ViewType.JS});
view.placeAt("content");
Thanks in advance.
Hi,
registerModulePath() will be your friend. See the "Module Concept" docu or Modularization and Dependency Management - User Interface Add-On for SAP NetWeaver - SAP Library
Regards
Andreas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi there,
you might also have to declare the "js" path as local resource
sap.ui.localResources("js");
jQuery.sap.registerModulePath("<app_js>", "js/<app_js>");
The latter assumes that the objects you have declared in the files under "js/<app_js>" have a namespace beginning with "<app_js>". Otherwise you have to change the first argument to registerModulePath.
HTH,
M.
sap.ui.localResources("js");jQuery.sap.registerModulePath('<app_js>', 'js/<app_js>');
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.