on 08-10-2015 3:35 AM
Followed code is from tutorial step 3
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta charset="UTF-8">
<title>Walkthrough</title>
<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-compatVersion="edge"
data-sap-ui-preload="async" >
</script>
<script>
sap.ui.getCore().attachInit(function () {
new sap.m.Text({
text : "Hello World"
}).placeAt("content");
});
</script>
</head>
<body class="sapUiBody" id="content">
</body>
</html>
Then I get some errors:
Uncaught Error: found in negative cache: 'sap/ui/core/Core.js' from undefined/sap/ui/core/Core.js: Error: found in negative cache: 'jquery.sap.events.js' from undefined/jquery.sap.events.js: Error: failed to load 'sap/ui/thirdparty/jquery-mobile-custom.js' from http://localhost:8080/resources/sap/ui/thirdparty/jquery-mobile-custom.js: 404 - Not Found
localhost/:16 Uncaught TypeError: sap.ui.getCore is not a function
I am sure that the path of src is correct coz I ran it sucessfully on another desktop, but after I copy the project to this desktop, it has the above problem. And then I re-download the UI5 runtime from SAP website and it works now.
But I am still curious about the reason of the problem.
Remove the first / in the path for the SAPUI5 Sources:
src="resources/sap-ui-core.js"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ming
I thought it should be
<script
id="sap-ui-bootstrap"
src="https://openui5.hana.ondemand.com/resources/sap-ui-core.js"
data-sap-ui-theme="sap_bluecrystal"
data-sap-ui-libs="sap.m"
data-sap-ui-compatVersion="edge"
data-sap-ui-preload="async" > </script>
-D
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please download "sap-ui-core.js" and give that path in src for offline.
else change src as below,
src="https://sapui5.netweaver.ondemand.com/resources/sap-ui-core.js"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Ming Yu,
If source file is available in path then please check that you have permission to access of that file.
these may cause of access permission also.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
6 | |
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.