Reputation: 119
I have every time when I am setting up a new sapui5 project, that nothing is shown, only a blank page.
I looked already at the console, some things are missing. I already changed the index.html, language and tried different things from the internet. Once I had the problem, it solves suddenly itself. I also reset the cache, what works once for me. I am using the local sap web IDE.
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta charset="UTF-8">
<title>test_chart</title>
<script id="sap-ui-bootstrap"
src="https://openui5.hana.ondemand.com/resources/sap-ui-core.js"
data-sap-ui-libs="sap.m"
data-sap-ui-theme="sap_belize"
data-sap-ui-compatVersion="edge"
data-sap-ui-resourceroots='{"test_charttest_chart": ""}'>
</script>
<link rel="stylesheet" type="text/css" href="css/style.css">
<script>
sap.ui.getCore().attachInit(function() {
new sap.m.Shell({
app: new sap.ui.core.ComponentContainer({
height : "100%",
name : "test_charttest_chart"
})
}).placeAt("content");
});
</script>
</head>
<body class="sapUiBody" id="content">
</body>
</html>
Upvotes: 1
Views: 1674
Reputation: 18054
Just to add an answer (since the problem is solved).. The issue was that the app was trying to load resources that are available only in SAPUI5 but not in OpenUI5 (e.g. sap.ushell
).
<script id="sap-ui-bootstrap" src="https://openui5.hana.ondemand.com/resources/sap-ui-core.js" ...>
Failed to load
sap/ushell/library.js
from ...
If you have an appropriate license for using SAPUI5 from CDN, simply replace src="https://openui5.hana...."
with a destination to SAPUI5 resources (e.g. src="https://sapui5.hana...."
).
In order to keep using OpenUI5, look for SAPUI5 dependencies in index.html
and manifest.json
, and remove them.
Upvotes: 1