Compare commits
9 Commits
pdf
...
test-exten
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d5c45d0326 | ||
|
|
390bd82502 | ||
|
|
5429617e0b | ||
|
|
211c7e43ae | ||
|
|
08ec0c7d0d | ||
|
|
0b8e7cece9 | ||
|
|
c33613fa57 | ||
|
|
c841765791 | ||
|
|
aeee07cbcd |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -17,3 +17,4 @@ reviews/msg-box
|
||||
reviews/db/test.db
|
||||
|
||||
*.openapi3.json
|
||||
sqlite.db
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using { Currency, managed, sap } from '@sap/cds/common';
|
||||
using { Currency, managed, sap, extensible } from '@sap/cds/common';
|
||||
namespace sap.capire.bookshop;
|
||||
|
||||
entity Books : managed {
|
||||
entity Books : managed, extensible {
|
||||
key ID : Integer;
|
||||
title : localized String(111);
|
||||
descr : localized String(1111);
|
||||
@@ -13,7 +13,7 @@ entity Books : managed {
|
||||
image : LargeBinary @Core.MediaType : 'image/png';
|
||||
}
|
||||
|
||||
entity Authors : managed {
|
||||
entity Authors : managed, extensible {
|
||||
key ID : Integer;
|
||||
name : String(111);
|
||||
dateOfBirth : Date;
|
||||
|
||||
@@ -1,55 +1,81 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Bookshop</title>
|
||||
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Bookshop</title>
|
||||
<script>
|
||||
window["sap-ushell-config"] = {
|
||||
defaultRenderer: "fiori2",
|
||||
applications: {
|
||||
"browse-books": {
|
||||
title: "Browse Books",
|
||||
description: "w/ SAP Fiori Elements",
|
||||
additionalInformation: "SAPUI5.Component=bookshop",
|
||||
applicationType: "URL",
|
||||
url: "/browse/webapp",
|
||||
navigationMode: "embedded",
|
||||
},
|
||||
"manage-books": {
|
||||
title: "Manage Books",
|
||||
description: "w/ SAP Fiori Elements",
|
||||
additionalInformation: "SAPUI5.Component=admin",
|
||||
applicationType: "URL",
|
||||
url: "/admin/webapp",
|
||||
navigationMode: "embedded",
|
||||
},
|
||||
"manage-orders": {
|
||||
title: "Manage Orders",
|
||||
description: "w/ SAP Fiori Elements",
|
||||
additionalInformation: "SAPUI5.Component=orders",
|
||||
applicationType: "URL",
|
||||
url: "/orders/webapp",
|
||||
navigationMode: "embedded",
|
||||
},
|
||||
},
|
||||
bootstrapPlugins: {
|
||||
RuntimeAuthoringPlugin: {
|
||||
component: "sap.ushell.plugins.rta",
|
||||
config: {
|
||||
validateAppVersion: false,
|
||||
},
|
||||
},
|
||||
PersonalizePlugin: {
|
||||
component: "sap.ushell.plugins.rta-personalize",
|
||||
config: {
|
||||
validateAppVersion: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<script>
|
||||
window["sap-ushell-config"] = {
|
||||
defaultRenderer: "fiori2",
|
||||
applications: {
|
||||
"browse-books": {
|
||||
title: "Browse Books",
|
||||
description: "w/ SAP Fiori Elements",
|
||||
additionalInformation: "SAPUI5.Component=bookshop",
|
||||
applicationType : "URL",
|
||||
url: "/browse/webapp",
|
||||
navigationMode: "embedded"
|
||||
},
|
||||
"manage-books": {
|
||||
title: "Manage Books",
|
||||
description: "w/ SAP Fiori Elements",
|
||||
additionalInformation: "SAPUI5.Component=admin",
|
||||
applicationType : "URL",
|
||||
url: "/admin/webapp",
|
||||
navigationMode: "embedded"
|
||||
},
|
||||
"manage-orders": {
|
||||
title: "Manage Orders",
|
||||
description: "w/ SAP Fiori Elements",
|
||||
additionalInformation: "SAPUI5.Component=orders",
|
||||
applicationType : "URL",
|
||||
url: "/orders/webapp",
|
||||
navigationMode: "embedded"
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<script id="sap-ushell-bootstrap" src="https://sapui5.hana.ondemand.com/test-resources/sap/ushell/bootstrap/sandbox.js"></script>
|
||||
<script id="sap-ui-bootstrap" src="https://sapui5.hana.ondemand.com/resources/sap-ui-core.js"
|
||||
data-sap-ui-libs="sap.m, sap.ushell, sap.collaboration, sap.ui.layout"
|
||||
data-sap-ui-compatVersion="edge"
|
||||
data-sap-ui-theme="sap_fiori_3"
|
||||
data-sap-ui-frameOptions="allow"
|
||||
></script>
|
||||
<script>
|
||||
sap.ui.getCore().attachInit(()=> sap.ushell.Container.createRenderer().placeAt("content"))
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body class="sapUiBody" id="content"></body>
|
||||
</html>
|
||||
<script
|
||||
id="sap-ushell-bootstrap"
|
||||
src="https://sapui5nightly.int.sap.eu2.hana.ondemand.com/test-resources/sap/ushell/bootstrap/sandbox.js"
|
||||
></script>
|
||||
<script
|
||||
id="sap-ui-bootstrap"
|
||||
src="https://sapui5nightly.int.sap.eu2.hana.ondemand.com/resources/sap-ui-core.js"
|
||||
data-sap-ui-libs="sap.m, sap.ushell, sap.collaboration, sap.ui.layout"
|
||||
data-sap-ui-compatVersion="edge"
|
||||
data-sap-ui-theme="sap_fiori_3"
|
||||
data-sap-ui-frameOptions="allow"
|
||||
data-sap-ui-bindingSyntax="complex"
|
||||
></script>
|
||||
<script>
|
||||
sap.ui
|
||||
.getCore()
|
||||
.attachInit(() =>
|
||||
sap.ushell.Container.createRenderer().placeAt("content")
|
||||
);
|
||||
sap.ui
|
||||
.getCore()
|
||||
.getConfiguration()
|
||||
.setFlexibilityServices([{ connector: "SessionStorageConnector" }]);
|
||||
</script>
|
||||
</head>
|
||||
<body class="sapUiBody" id="content"></body>
|
||||
</html>
|
||||
|
||||
@@ -22,6 +22,10 @@
|
||||
}
|
||||
},
|
||||
"sap.ui5": {
|
||||
"flexEnabled": true,
|
||||
"config": {
|
||||
"experimentalCAPScenario": true
|
||||
},
|
||||
"dependencies": {
|
||||
"libs": {
|
||||
"sap.fe.templates": {}
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
}
|
||||
},
|
||||
"sap.ui5": {
|
||||
"flexEnabled": true,
|
||||
"dependencies": {
|
||||
"libs": {
|
||||
"sap.fe.templates": {}
|
||||
|
||||
@@ -30,13 +30,13 @@
|
||||
"kind": "odata",
|
||||
"model": "@capire/orders"
|
||||
},
|
||||
"extensibility": {
|
||||
"kind": "uiflex"
|
||||
},
|
||||
"db": {
|
||||
"kind": "sql",
|
||||
"[development]": {
|
||||
"model": "db/sqlite"
|
||||
},
|
||||
"[production]": {
|
||||
"model": "db/hana"
|
||||
"kind": "sqlite",
|
||||
"credentials": {
|
||||
"database": "sqlite.db"
|
||||
}
|
||||
},
|
||||
"messaging": {
|
||||
@@ -46,4 +46,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
14
fiori/test.http
Normal file
14
fiori/test.http
Normal file
@@ -0,0 +1,14 @@
|
||||
# Add integer extension field to Books
|
||||
POST http://localhost:4004/extensibility/addExtension
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"extensions": [
|
||||
"{\"extend\":\"AdminService.Books\",\"elements\":{\"neuesFeld2\":{\"type\":\"cds.String\", \"default\":\"hallo\"}}}"
|
||||
]
|
||||
}
|
||||
|
||||
###
|
||||
# { "extend": "AdminService.Books", "elements":{
|
||||
# "abc":{"type":"cds.Integer"}
|
||||
# }},
|
||||
@@ -19,19 +19,38 @@
|
||||
url: "/orders/webapp",
|
||||
navigationMode: "embedded"
|
||||
}
|
||||
}
|
||||
},
|
||||
bootstrapPlugins: {
|
||||
RuntimeAuthoringPlugin: {
|
||||
component: "sap.ushell.plugins.rta",
|
||||
config: {
|
||||
validateAppVersion: false,
|
||||
},
|
||||
},
|
||||
PersonalizePlugin: {
|
||||
component: "sap.ushell.plugins.rta-personalize",
|
||||
config: {
|
||||
validateAppVersion: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<script id="sap-ushell-bootstrap" src="https://sapui5.hana.ondemand.com/test-resources/sap/ushell/bootstrap/sandbox.js"></script>
|
||||
<script id="sap-ui-bootstrap" src="https://sapui5.hana.ondemand.com/resources/sap-ui-core.js"
|
||||
data-sap-ui-libs="sap.m, sap.ushell, sap.collaboration, sap.ui.layout"
|
||||
data-sap-ui-compatVersion="edge"
|
||||
data-sap-ui-theme="sap_fiori_3"
|
||||
data-sap-ui-frameOptions="allow"
|
||||
></script>
|
||||
<script id="sap-ushell-bootstrap" src="https://sapui5nightly.int.sap.eu2.hana.ondemand.com/test-resources/sap/ushell/bootstrap/sandbox.js"></script>
|
||||
<script id="sap-ui-bootstrap" src="https://sapui5nightly.int.sap.eu2.hana.ondemand.com/resources/sap-ui-core.js"
|
||||
data-sap-ui-libs="sap.m, sap.ushell, sap.collaboration, sap.ui.layout"
|
||||
data-sap-ui-compatVersion="edge"
|
||||
data-sap-ui-theme="sap_fiori_3"
|
||||
data-sap-ui-frameOptions="allow"
|
||||
data-sap-ui-bindingSyntax="complex"
|
||||
></script>
|
||||
<script>
|
||||
sap.ui.getCore().attachInit(()=> sap.ushell.Container.createRenderer().placeAt("content"))
|
||||
sap.ui.getCore().attachInit(()=> sap.ushell.Container.createRenderer().placeAt("content"));
|
||||
sap.ui
|
||||
.getCore()
|
||||
.getConfiguration()
|
||||
.setFlexibilityServices([{ connector: "SessionStorageConnector" }]);
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
@@ -22,6 +22,10 @@
|
||||
}
|
||||
},
|
||||
"sap.ui5": {
|
||||
"flexEnabled": true,
|
||||
"config": {
|
||||
"experimentalCAPScenario": true
|
||||
},
|
||||
"dependencies": {
|
||||
"libs": {
|
||||
"sap.fe.templates": {}
|
||||
|
||||
3
package-lock.json
generated
3
package-lock.json
generated
@@ -1,3 +1,6 @@
|
||||
// 20211103133211
|
||||
// https://raw.githubusercontent.com/SAP-samples/cloud-cap-samples/main/package-lock.json
|
||||
|
||||
{
|
||||
"name": "@capire/samples",
|
||||
"version": "2.0.0",
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
"@capire/media": "./media",
|
||||
"@capire/orders": "./orders",
|
||||
"@capire/reviews": "./reviews",
|
||||
"@sap/cds": "^5.5.3"
|
||||
"@sap/cds": "git+https://github.tools.sap/cap/cds.git",
|
||||
"@sap/cds-dk": "*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"chai": "^4.3.4",
|
||||
|
||||
Reference in New Issue
Block a user