Added changes for simple field extensibility (UIFlex)

This commit is contained in:
nkaputnik
2021-12-07 11:10:12 +01:00
parent 1fde0c928b
commit a6ea2fb130
5 changed files with 41 additions and 8 deletions

View File

@@ -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; namespace sap.capire.bookshop;
entity Books : managed { entity Books : managed, extensible {
key ID : Integer; key ID : Integer;
title : localized String(111); title : localized String(111);
descr : localized String(1111); descr : localized String(1111);
@@ -13,7 +13,7 @@ entity Books : managed {
image : LargeBinary @Core.MediaType : 'image/png'; image : LargeBinary @Core.MediaType : 'image/png';
} }
entity Authors : managed { entity Authors : managed, extensible {
key ID : Integer; key ID : Integer;
name : String(111); name : String(111);
dateOfBirth : Date; dateOfBirth : Date;

View File

@@ -50,6 +50,10 @@
} }
}, },
"sap.ui5": { "sap.ui5": {
"flexEnabled": true,
"config": {
"experimentalCAPScenario": true
},
"dependencies": { "dependencies": {
"minUI5Version": "1.81.0", "minUI5Version": "1.81.0",
"libs": { "libs": {

View File

@@ -22,6 +22,10 @@
} }
}, },
"sap.ui5": { "sap.ui5": {
"flexEnabled": true,
"config": {
"experimentalCAPScenario": true
},
"dependencies": { "dependencies": {
"libs": { "libs": {
"sap.fe.templates": {} "sap.fe.templates": {}

View File

@@ -10,7 +10,21 @@
<script> <script>
window["sap-ushell-config"] = { window["sap-ushell-config"] = {
defaultRenderer: "fiori2", defaultRenderer: "fiori2",
applications: {} applications: {},
bootstrapPlugins: {
RuntimeAuthoringPlugin: {
component: "sap.ushell.plugins.rta",
config: {
validateAppVersion: false,
},
},
PersonalizePlugin: {
component: "sap.ushell.plugins.rta-personalize",
config: {
validateAppVersion: false,
},
},
}
}; };
</script> </script>
@@ -22,8 +36,13 @@
data-sap-ui-frameOptions="allow" data-sap-ui-frameOptions="allow"
></script> ></script>
<script> <script>
sap.ui.getCore().attachInit(()=> sap.ushell.Container.createRenderer().placeAt("content")) sap.ui.getCore().attachInit(()=> sap.ushell.Container.createRenderer().placeAt("content"));
</script> sap.ui
.getCore()
.getConfiguration()
.setFlexibilityServices([{ connector: "SessionStorageConnector" }]);
sap.ui.getCore().getConfiguration().setLanguage("en");
</script>
</head> </head>
<body class="sapUiBody" id="content"></body> <body class="sapUiBody" id="content"></body>

View File

@@ -3,7 +3,7 @@
"version": "1.0.0", "version": "1.0.0",
"dependencies": { "dependencies": {
"@capire/bookstore": "*", "@capire/bookstore": "*",
"@sap/cds": "^5", "@sap/cds": "*",
"express": "^4.17.1", "express": "^4.17.1",
"passport": "^0.4.1" "passport": "^0.4.1"
}, },
@@ -13,6 +13,9 @@
}, },
"cds": { "cds": {
"requires": { "requires": {
"extensibility": {
"kind": "uiflex"
},
"auth": { "auth": {
"strategy": "dummy" "strategy": "dummy"
}, },
@@ -36,7 +39,10 @@
} }
}, },
"db": { "db": {
"kind": "sql" "kind": "sqlite",
"credentials": {
"database": "sqlite.db"
}
}, },
"db-ext": { "db-ext": {
"[development]": { "[development]": {