on 09-20-2017 3:46 PM
I am trying to follow the OpenUI5 Walkthrough in MII 15.1, but I keep running into problems. The first problem is that Step 2 (Bootstrap) did not work. I used the default bootstrap in MIII source (/XMII/JavaScript/bootstrap.js) instead and I could pass this step. The next problem was in Step 4 (Views). I get the error
Uncaught Error: resource sap/ui/demo/wt/view/App.view.xml could not be loaded from /sapui5/resources/sap/ui/demo/wt/view/App.view.xml. Check for 'file not found' or parse errors.
I have the files from the example, but the problem appears to be where the system is looking for the View. It is looking in /sapui5/resources/... and not in the current directory. Here is the index page:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta charset="utf-8">
<title>Walkthrough</title>
<SCRIPT type="text/javascript"
src="/XMII/JavaScript/bootstrap.js"
data-sap-ui-theme="sap_belize"
data-sap-ui-libs="sap.m"
data-sap-ui-compatVersion="edge"
data-sap-ui-preload="async"
data-libs="i5Chart,i5Grid,i5SPCChart,i5Command"
data-sap-ui-resourceroots='{
"sap.ui.demo.wt": "./"
}' >
</SCRIPT>
<script>
sap.ui.getCore().attachInit(function () {
sap.ui.xmlview({
viewName : "sap.ui.demo.wt.view.App"
}).placeAt("content");
});
</script>
</head>
<body class="sapUiBody" id="content">
</body>
</html>
and here is the view:
<mvc:View xmlns="sap.m" xmlns:mvc="sap.ui.core.mvc">
<Text text="Hello World"/>
</mvc:View>
I am trying to get sapui5 to find the View in the correct folder, however I have not had any luck. Any help would be appreciated. Thank you.
You can try "/sapui5/resources/sap-ui-core.js" for your ui5 script src. I think the MII bootstrap created it's own script tag to load the ui5 libs and maybe that is hosing your resource roots definition.
Regards,
Christian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
10 | |
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.