Skip to content

Commit

Permalink
[INTERNAL] For demo app, use actual data, move mockServer to test
Browse files Browse the repository at this point in the history
  • Loading branch information
mitch-b committed Dec 17, 2016
1 parent 45a0df3 commit d5bc3a0
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 6 deletions.
8 changes: 2 additions & 6 deletions demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,15 @@
data-sap-ui-libs="sap.m"
data-sap-ui-theme="sap_belize"
data-sap-ui-compatVersion="edge"
data-sap-ui-resourceroots='{"myCompany.myApp": "./"}'
data-sap-ui-frameOptions='allow'> // NON-SECURE setting for testing environment
data-sap-ui-resourceroots='{"myCompany.myApp": "./"}'>
</script>

<script>
sap.ui.getCore().attachInit(function () {
sap.ui.require([
"myCompany/myApp/localService/mockserver",
"sap/m/Shell",
"sap/ui/core/ComponentContainer"
], function (server, Shell, ComponentContainer) {
// set up test service for local testing
server.init();
], function (Shell, ComponentContainer) {
// initialize the UI component
new Shell({
app: new ComponentContainer({
Expand Down
44 changes: 44 additions & 0 deletions test/mockServer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Manage Products</title>

<!-- Bootstrapping UI5 -->
<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='{"myCompany.myApp": "../demo"}'
data-sap-ui-frameOptions='allow'> // NON-SECURE setting for testing environment
</script>

<script>
sap.ui.getCore().attachInit(function () {
sap.ui.require([
"myCompany/myApp/localService/mockserver",
"sap/m/Shell",
"sap/ui/core/ComponentContainer"
], function (server, Shell, ComponentContainer) {
// set up test service for local testing
server.init();
// initialize the UI component
new Shell({
app: new ComponentContainer({
height : "100%",
name : "myCompany.myApp"
})
}).placeAt("content");
});
});
</script>

</head>

<!-- UI Content -->
<body class="sapUiBody" id="content">
</body>
</html>

0 comments on commit d5bc3a0

Please sign in to comment.