From 7964c9aefd12d7395ffeba55ca49506d1f60b4fd Mon Sep 17 00:00:00 2001 From: Gregor Wolf Date: Fri, 12 Nov 2021 20:59:45 +0100 Subject: [PATCH 01/20] adjust formatting --- bookshop/srv/cat-service.cds | 42 +++++++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 12 deletions(-) diff --git a/bookshop/srv/cat-service.cds b/bookshop/srv/cat-service.cds index 2441db25..db9724d1 100644 --- a/bookshop/srv/cat-service.cds +++ b/bookshop/srv/cat-service.cds @@ -1,16 +1,34 @@ -using { sap.capire.bookshop as my } from '../db/schema'; -service CatalogService @(path:'/browse') { +using {sap.capire.bookshop as my} from '../db/schema'; - /** For displaying lists of Books */ - @readonly entity ListOfBooks as projection on Books - excluding { descr }; +service CatalogService @(path : '/browse') { - /** For display in details pages */ - @readonly entity Books as projection on my.Books { *, - author.name as author - } excluding { createdBy, modifiedBy }; + /** + * For displaying lists of Books + */ + @readonly + entity ListOfBooks as projection on Books excluding { + descr + }; - @requires: 'authenticated-user' - action submitOrder ( book: Books:ID, quantity: Integer ) returns { stock: Integer }; - event OrderedBook : { book: Books:ID; quantity: Integer; buyer: String }; + /** + * For display in details pages + */ + @readonly + entity Books as projection on my.Books { + * , author.name as author + } excluding { + createdBy, + modifiedBy + }; + + @requires : 'authenticated-user' + action submitOrder(book : Books:ID, quantity : Integer) returns { + stock : Integer + }; + + event OrderedBook : { + book : Books:ID; + quantity : Integer; + buyer : String + }; } From 2a44cfa9dcd8e3e88b62081140a8fa0cd5cc0ea2 Mon Sep 17 00:00:00 2001 From: Gregor Wolf Date: Fri, 12 Nov 2021 21:25:33 +0100 Subject: [PATCH 02/20] add Authors, rename author attribute --- bookshop/srv/cat-service.cds | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bookshop/srv/cat-service.cds b/bookshop/srv/cat-service.cds index db9724d1..a8ac0f88 100644 --- a/bookshop/srv/cat-service.cds +++ b/bookshop/srv/cat-service.cds @@ -15,12 +15,18 @@ service CatalogService @(path : '/browse') { */ @readonly entity Books as projection on my.Books { - * , author.name as author + * , author.name as authorName } excluding { createdBy, modifiedBy }; + @readonly + entity Authors as projection on my.Authors excluding { + createdBy, + modifiedBy + }; + @requires : 'authenticated-user' action submitOrder(book : Books:ID, quantity : Integer) returns { stock : Integer From d376e6e0638653d9bad29d48ba4d74c79300878d Mon Sep 17 00:00:00 2001 From: Gregor Wolf Date: Fri, 12 Nov 2021 21:27:40 +0100 Subject: [PATCH 03/20] UI annotations for Authors --- fiori/app/authors/fiori-service.cds | 46 +++++++++++++++++++++++++++++ fiori/app/services.cds | 2 +- 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 fiori/app/authors/fiori-service.cds diff --git a/fiori/app/authors/fiori-service.cds b/fiori/app/authors/fiori-service.cds new file mode 100644 index 00000000..c3b0ec1a --- /dev/null +++ b/fiori/app/authors/fiori-service.cds @@ -0,0 +1,46 @@ +using CatalogService from '@capire/bookshop'; + +//////////////////////////////////////////////////////////////////////////// +// +// Authors Object Page +// +annotate CatalogService.Authors with @(UI : { + HeaderInfo : { + TypeName : 'Author', + TypeNamePlural : 'Authors', + Description : {Value : name} + }, + HeaderFacets : [{ + $Type : 'UI.ReferenceFacet', + Label : '{i18n>Description}', + Target : '@UI.FieldGroup#Descr' + }, ], + Facets : [{ + $Type : 'UI.ReferenceFacet', + Label : '{i18n>Details}', + Target : 'books/@UI.LineItem' + }, ], + FieldGroup #Descr : {Data : [ + {Value : name}, + {Value : dateOfBirth}, + {Value : dateOfDeath}, + {Value : placeOfBirth}, + {Value : placeOfDeath}, + ]}, +}); + + +//////////////////////////////////////////////////////////////////////////// +// +// Authors List Page +// +annotate CatalogService.Authors with @(UI : { + SelectionFields : [ + ID, + name, + ], + LineItem : [ + {Value : ID}, + {Value : name}, + ] +}, ); diff --git a/fiori/app/services.cds b/fiori/app/services.cds index e59f69f8..6f96e3b9 100644 --- a/fiori/app/services.cds +++ b/fiori/app/services.cds @@ -4,6 +4,6 @@ using from './admin/fiori-service'; using from './browse/fiori-service'; +using from './authors/fiori-service'; using from './common'; - using from '@capire/bookstore/srv/mashup'; From 597afeb3d880ab4bf3fc2769c501a4f11f462c2d Mon Sep 17 00:00:00 2001 From: Gregor Wolf Date: Fri, 12 Nov 2021 21:28:23 +0100 Subject: [PATCH 04/20] format, rename author to authorName --- fiori/app/browse/fiori-service.cds | 83 ++++++++++++++++-------------- 1 file changed, 45 insertions(+), 38 deletions(-) diff --git a/fiori/app/browse/fiori-service.cds b/fiori/app/browse/fiori-service.cds index 352e52f5..786a7864 100644 --- a/fiori/app/browse/fiori-service.cds +++ b/fiori/app/browse/fiori-service.cds @@ -4,47 +4,54 @@ using CatalogService from '@capire/bookshop'; // // Books Object Page // -annotate CatalogService.Books with @( - UI: { - HeaderInfo: { - TypeName: 'Book', - TypeNamePlural: 'Books', - Description: {Value: author} - }, - HeaderFacets: [ - {$Type: 'UI.ReferenceFacet', Label: '{i18n>Description}', Target: '@UI.FieldGroup#Descr'}, - ], - Facets: [ - {$Type: 'UI.ReferenceFacet', Label: '{i18n>Details}', Target: '@UI.FieldGroup#Price'}, - ], - FieldGroup#Descr: { - Data: [ - {Value: descr}, - ] - }, - FieldGroup#Price: { - Data: [ - {Value: price}, - {Value: currency.symbol, Label: '{i18n>Currency}'}, - ] - }, - } -); +annotate CatalogService.Books with @(UI : { + HeaderInfo : { + TypeName : 'Book', + TypeNamePlural : 'Books', + Description : {Value : authorName} + }, + HeaderFacets : [{ + $Type : 'UI.ReferenceFacet', + Label : '{i18n>Description}', + Target : '@UI.FieldGroup#Descr' + }, ], + Facets : [{ + $Type : 'UI.ReferenceFacet', + Label : '{i18n>Details}', + Target : '@UI.FieldGroup#Price' + }, ], + FieldGroup #Descr : {Data : [{Value : descr}, ]}, + FieldGroup #Price : {Data : [ + {Value : price}, + { + Value : currency.symbol, + Label : '{i18n>Currency}' + }, + ]}, +}); //////////////////////////////////////////////////////////////////////////// // // Books Object Page // -annotate CatalogService.Books with @( - UI: { - SelectionFields: [ ID, price, currency_code ], - LineItem: [ - {Value: title}, - {Value: author, Label:'{i18n>Author}'}, - {Value: genre.name}, - {Value: price}, - {Value: currency.symbol, Label:' '}, - ] - }, -); +annotate CatalogService.Books with @(UI : { + SelectionFields : [ + ID, + price, + currency_code + ], + LineItem : [ + {Value : title}, + { + Value : authorName, + Label : '{i18n>Author}' + }, + {Value : genre.name}, + {Value : price}, + { + Value : currency.symbol, + Label : ' ' + }, + ] +}, ); From 03869e5896285fd48e74dad58a6a6bb5ce363a41 Mon Sep 17 00:00:00 2001 From: Gregor Wolf Date: Fri, 12 Nov 2021 21:28:49 +0100 Subject: [PATCH 05/20] Fiori UI for Authors --- fiori/app/authors/webapp/Component.js | 7 ++ fiori/app/authors/webapp/i18n/i18n.properties | 11 ++ fiori/app/authors/webapp/manifest.json | 106 ++++++++++++++++++ 3 files changed, 124 insertions(+) create mode 100644 fiori/app/authors/webapp/Component.js create mode 100644 fiori/app/authors/webapp/i18n/i18n.properties create mode 100644 fiori/app/authors/webapp/manifest.json diff --git a/fiori/app/authors/webapp/Component.js b/fiori/app/authors/webapp/Component.js new file mode 100644 index 00000000..05638a71 --- /dev/null +++ b/fiori/app/authors/webapp/Component.js @@ -0,0 +1,7 @@ +sap.ui.define(["sap/fe/core/AppComponent"], function (AppComponent) { + "use strict"; + return AppComponent.extend("authors.Component", { + metadata: { manifest: "json" }, + }); +}); +/* eslint no-undef:0 */ diff --git a/fiori/app/authors/webapp/i18n/i18n.properties b/fiori/app/authors/webapp/i18n/i18n.properties new file mode 100644 index 00000000..9d2dafd7 --- /dev/null +++ b/fiori/app/authors/webapp/i18n/i18n.properties @@ -0,0 +1,11 @@ +# This is the resource bundle of itelo +# __ldi.translation.uuid=c3431418-9caf-11e8-98d0-529269fb1459 + +# JCI app descriptor contains lower case TITLE +appTitle=Bookshop Authors + +# JCI app descriptor contains lower case DESCRIPTION +appSubTitle=Bookshop Authors + +# JCI app descriptor contains lower case DESCRIPTION +appDescription=Bookshop Authors diff --git a/fiori/app/authors/webapp/manifest.json b/fiori/app/authors/webapp/manifest.json new file mode 100644 index 00000000..2d78a16e --- /dev/null +++ b/fiori/app/authors/webapp/manifest.json @@ -0,0 +1,106 @@ +{ + "_version": "1.8.0", + "sap.app": { + "id": "authors", + "type": "application", + "title": "Browse Authors", + "description": "Sample Application", + "i18n": "i18n/i18n.properties", + "dataSources": { + "CatalogService": { + "uri": "/browse/", + "type": "OData", + "settings": { + "odataVersion": "4.0" + } + } + }, + "-sourceTemplate": { + "id": "ui5template.basicSAPUI5ApplicationProject", + "-id": "ui5template.smartTemplate", + "-version": "1.40.12" + } + }, + "sap.ui5": { + "dependencies": { + "libs": { + "sap.fe.templates": {} + } + }, + "models": { + "i18n": { + "type": "sap.ui.model.resource.ResourceModel", + "uri": "i18n/i18n.properties" + }, + "": { + "dataSource": "CatalogService", + "settings": { + "synchronizationMode": "None", + "operationMode": "Server", + "autoExpandSelect": true, + "earlyRequests": true, + "groupProperties": { + "default": { + "submit": "Auto" + } + } + } + } + }, + "routing": { + "routes": [ + { + "pattern": ":?query:", + "name": "AuthorsList", + "target": "AuthorsList" + }, + { + "pattern": "Authors({key}):?query:", + "name": "AuthorsDetails", + "target": "AuthorsDetails" + } + ], + "targets": { + "AuthorsList": { + "type": "Component", + "id": "AuthorsList", + "name": "sap.fe.templates.ListReport", + "options": { + "settings": { + "entitySet": "Authors", + "navigation": { + "Authors": { + "detail": { + "route": "AuthorsDetails" + } + } + } + } + } + }, + "AuthorsDetails": { + "type": "Component", + "id": "AuthorsDetailsList", + "name": "sap.fe.templates.ObjectPage", + "options": { + "settings": { + "entitySet": "Authors" + } + } + } + } + }, + "contentDensities": { + "compact": true, + "cozy": true + } + }, + "sap.ui": { + "technology": "UI5", + "fullWidth": false + }, + "sap.fiori": { + "registrationIds": [], + "archeType": "transactional" + } +} From 575cffe70a04d5f02a5f5ad6ed84af70a01b1e1b Mon Sep 17 00:00:00 2001 From: Gregor Wolf Date: Fri, 12 Nov 2021 21:29:21 +0100 Subject: [PATCH 06/20] migrate to fioriSandboxConfig.json --- fiori/app/appconfig/fioriSandboxConfig.json | 135 ++++++++++++++++++++ fiori/app/fiori-apps.html | 27 +--- 2 files changed, 136 insertions(+), 26 deletions(-) create mode 100644 fiori/app/appconfig/fioriSandboxConfig.json diff --git a/fiori/app/appconfig/fioriSandboxConfig.json b/fiori/app/appconfig/fioriSandboxConfig.json new file mode 100644 index 00000000..5b21b051 --- /dev/null +++ b/fiori/app/appconfig/fioriSandboxConfig.json @@ -0,0 +1,135 @@ +{ + "services": { + "LaunchPage": { + "adapter": { + "config": { + "catalogs": [], + "groups": [ + { + "id": "Bookshop", + "title": "Bookshop", + "isPreset": true, + "isVisible": true, + "isGroupLocked": false, + "tiles": [ + { + "id": "BrowseBooks", + "size": "1×1", + "tileType": "sap.ushell.ui.tile.StaticTile", + "properties": { + "title": "Browse Books", + "targetURL": "#Books-display" + } + }, + { + "id": "BrowseAuthors", + "size": "1×1", + "tileType": "sap.ushell.ui.tile.StaticTile", + "properties": { + "title": "Browse Authors", + "targetURL": "#Authors-display" + } + } + ] + }, + { + "id": "Administration", + "title": "Administration", + "isPreset": true, + "isVisible": true, + "isGroupLocked": false, + "tiles": [ + { + "id": "ManageBooks", + "size": "1×1", + "tileType": "sap.ushell.ui.tile.StaticTile", + "properties": { + "title": "Manage Books", + "targetURL": "#Books-manage" + } + }, + { + "id": "ManageOrders", + "size": "1×1", + "tileType": "sap.ushell.ui.tile.StaticTile", + "properties": { + "title": "Manage Orders", + "targetURL": "#Orders-manage" + } + } + ] + } + ] + } + } + }, + "NavTargetResolution": { + "config": { + "enableClientSideTargetResolution": true + } + }, + "ClientSideTargetResolution": { + "adapter": { + "config": { + "inbounds": { + "BrowseBooks": { + "semanticObject": "Books", + "action": "display", + "title": "Browse Books", + "signature": { + "parameters": {}, + "additionalParameters": "allowed" + }, + "resolutionResult": { + "applicationType": "SAPUI5", + "additionalInformation": "SAPUI5.Component=bookshop", + "url": "/browse/webapp" + } + }, + "BrowseAuthors": { + "semanticObject": "Authors", + "action": "display", + "title": "Browse Authors", + "signature": { + "parameters": {}, + "additionalParameters": "allowed" + }, + "resolutionResult": { + "applicationType": "SAPUI5", + "additionalInformation": "SAPUI5.Component=authors", + "url": "/authors/webapp" + } + }, + "ManageBooks": { + "semanticObject": "Books", + "action": "manage", + "title": "Manage Books", + "signature": { + "parameters": {}, + "additionalParameters": "allowed" + }, + "resolutionResult": { + "applicationType": "SAPUI5", + "additionalInformation": "SAPUI5.Component=admin", + "url": "/admin/webapp" + } + }, + "ManageOrders": { + "semanticObject": "Orders", + "action": "manage", + "signature": { + "parameters": {}, + "additionalParameters": "allowed" + }, + "resolutionResult": { + "applicationType": "SAPUI5", + "additionalInformation": "SAPUI5.Component=orders", + "url": "/orders/webapp" + } + } + } + } + } + } + } +} diff --git a/fiori/app/fiori-apps.html b/fiori/app/fiori-apps.html index 6c229e6b..0a452268 100644 --- a/fiori/app/fiori-apps.html +++ b/fiori/app/fiori-apps.html @@ -10,32 +10,7 @@ From 19c886d6dc4358a013893021f21e3e206ff4725b Mon Sep 17 00:00:00 2001 From: Gregor Wolf Date: Fri, 12 Nov 2021 21:41:39 +0100 Subject: [PATCH 07/20] fix implicit redirection issue --- bookshop/srv/cat-service.cds | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bookshop/srv/cat-service.cds b/bookshop/srv/cat-service.cds index a8ac0f88..223b045a 100644 --- a/bookshop/srv/cat-service.cds +++ b/bookshop/srv/cat-service.cds @@ -22,7 +22,9 @@ service CatalogService @(path : '/browse') { }; @readonly - entity Authors as projection on my.Authors excluding { + entity Authors as projection on my.Authors { + * , books : redirected to Books + } excluding { createdBy, modifiedBy }; From 152d088ff4015b955bffbf769c436dd44ba19541 Mon Sep 17 00:00:00 2001 From: Gregor Wolf Date: Fri, 12 Nov 2021 21:49:39 +0100 Subject: [PATCH 08/20] rename author to authorName --- test/localized-data.test.js | 36 ++++++++++++++++++------------------ test/odata.test.js | 10 +++++----- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/test/localized-data.test.js b/test/localized-data.test.js index 4d399786..316ae9e4 100644 --- a/test/localized-data.test.js +++ b/test/localized-data.test.js @@ -11,39 +11,39 @@ describe('Localized Data', () => { }) it('supports sap-language param', async () => { - const { data } = await GET(`/browse/Books?$select=title,author` + '&sap-language=de') + const { data } = await GET(`/browse/Books?$select=title,authorName` + '&sap-language=de') expect(data.value).to.containSubset([ - { title: 'Sturmhöhe', author: 'Emily Brontë' }, - { title: 'Jane Eyre', author: 'Charlotte Brontë' }, - { title: 'The Raven', author: 'Edgar Allen Poe' }, - { title: 'Eleonora', author: 'Edgar Allen Poe' }, - { title: 'Catweazle', author: 'Richard Carpenter' }, + { title: 'Sturmhöhe', authorName: 'Emily Brontë' }, + { title: 'Jane Eyre', authorName: 'Charlotte Brontë' }, + { title: 'The Raven', authorName: 'Edgar Allen Poe' }, + { title: 'Eleonora', authorName: 'Edgar Allen Poe' }, + { title: 'Catweazle', authorName: 'Richard Carpenter' }, ]) }) it('supports accept-language header', async () => { - const { data } = await GET(`/browse/Books?$select=title,author`, { + const { data } = await GET(`/browse/Books?$select=title,authorName`, { headers: { 'Accept-Language': 'de' }, }) expect(data.value).to.containSubset([ - { title: 'Sturmhöhe', author: 'Emily Brontë' }, - { title: 'Jane Eyre', author: 'Charlotte Brontë' }, - { title: 'The Raven', author: 'Edgar Allen Poe' }, - { title: 'Eleonora', author: 'Edgar Allen Poe' }, - { title: 'Catweazle', author: 'Richard Carpenter' }, + { title: 'Sturmhöhe', authorName: 'Emily Brontë' }, + { title: 'Jane Eyre', authorName: 'Charlotte Brontë' }, + { title: 'The Raven', authorName: 'Edgar Allen Poe' }, + { title: 'Eleonora', authorName: 'Edgar Allen Poe' }, + { title: 'Catweazle', authorName: 'Richard Carpenter' }, ]) }) it('supports queries with $expand', async () => { - const { data } = await GET(`/browse/Books?&$select=title,author&$expand=currency`, { + const { data } = await GET(`/browse/Books?&$select=title,authorName&$expand=currency`, { headers: { 'Accept-Language': 'de' }, }) expect(data.value).to.containSubset([ - { title: 'Sturmhöhe', author: 'Emily Brontë', currency: { name: 'Pfund' } }, - { title: 'Jane Eyre', author: 'Charlotte Brontë', currency: { name: 'Pfund' } }, - { title: 'The Raven', author: 'Edgar Allen Poe', currency: { name: 'US-Dollar' } }, - { title: 'Eleonora', author: 'Edgar Allen Poe', currency: { name: 'US-Dollar' } }, - { title: 'Catweazle', author: 'Richard Carpenter', currency: { name: 'Yen' } }, + { title: 'Sturmhöhe', authorName: 'Emily Brontë', currency: { name: 'Pfund' } }, + { title: 'Jane Eyre', authorName: 'Charlotte Brontë', currency: { name: 'Pfund' } }, + { title: 'The Raven', authorName: 'Edgar Allen Poe', currency: { name: 'US-Dollar' } }, + { title: 'Eleonora', authorName: 'Edgar Allen Poe', currency: { name: 'US-Dollar' } }, + { title: 'Catweazle', authorName: 'Richard Carpenter', currency: { name: 'Yen' } }, ]) }) diff --git a/test/odata.test.js b/test/odata.test.js index 43b90791..ff1945f2 100644 --- a/test/odata.test.js +++ b/test/odata.test.js @@ -19,13 +19,13 @@ describe('OData Protocol', () => { it('supports $search in multiple fields', async () => { const { data } = await GET `/browse/Books ${{ - params: { $search: 'Po', $select: `title,author` }, + params: { $search: 'Po', $select: `title,authorName` }, }}` expect(data.value).to.eql([ - { ID: 201, title: 'Wuthering Heights', author: 'Emily Brontë' }, - { ID: 207, title: 'Jane Eyre', author: 'Charlotte Brontë' }, - { ID: 251, title: 'The Raven', author: 'Edgar Allen Poe' }, - { ID: 252, title: 'Eleonora', author: 'Edgar Allen Poe' }, + { ID: 201, title: 'Wuthering Heights', authorName: 'Emily Brontë' }, + { ID: 207, title: 'Jane Eyre', authorName: 'Charlotte Brontë' }, + { ID: 251, title: 'The Raven', authorName: 'Edgar Allen Poe' }, + { ID: 252, title: 'Eleonora', authorName: 'Edgar Allen Poe' }, ]) }) From 7407b0aae3789f69a3b4bc46d1c8bca5075d293e Mon Sep 17 00:00:00 2001 From: Gregor Wolf Date: Fri, 12 Nov 2021 22:04:48 +0100 Subject: [PATCH 09/20] format --- fiori/app/common.cds | 346 +++++++++++++++++++++++-------------------- 1 file changed, 183 insertions(+), 163 deletions(-) diff --git a/fiori/app/common.cds b/fiori/app/common.cds index b609498d..d262aaf5 100644 --- a/fiori/app/common.cds +++ b/fiori/app/common.cds @@ -1,48 +1,54 @@ /* - Common Annotations shared by all apps + Common Annotations shared by all apps */ -using { sap.capire.bookshop as my } from '@capire/bookshop'; -using { sap.common } from '@capire/common'; +using {sap.capire.bookshop as my} from '@capire/bookshop'; +using {sap.common} from '@capire/common'; //////////////////////////////////////////////////////////////////////////// // // Books Lists // annotate my.Books with @( - Common.SemanticKey: [title], - UI: { - Identification: [{Value:title}], - SelectionFields: [ ID, author_ID, price, currency_code ], - LineItem: [ - {Value: ID}, - {Value: title}, - {Value: author.name, Label:'{i18n>Author}'}, - {Value: genre.name}, - {Value: stock}, - {Value: price}, - {Value: currency.symbol, Label:' '}, - ] - } + Common.SemanticKey : [title], + UI : { + Identification : [{Value : title}], + SelectionFields : [ + ID, + author_ID, + price, + currency_code + ], + LineItem : [ + {Value : ID}, + {Value : title}, + { + Value : author.name, + Label : '{i18n>Author}' + }, + {Value : genre.name}, + {Value : stock}, + {Value : price}, + { + Value : currency.symbol, + Label : ' ' + }, + ] + } ) { - author @ValueList.entity:'Authors'; + author @ValueList.entity : 'Authors'; }; //////////////////////////////////////////////////////////////////////////// // // Books Details // -annotate my.Books with @( - UI: { - HeaderInfo: { - TypeName: '{i18n>Book}', - TypeNamePlural: '{i18n>Books}', - Title: {Value: title}, - Description: {Value: author.name} - }, - } -); - +annotate my.Books with @(UI : {HeaderInfo : { + TypeName : '{i18n>Book}', + TypeNamePlural : '{i18n>Books}', + Title : {Value : title}, + Description : {Value : author.name} +}, }); //////////////////////////////////////////////////////////////////////////// @@ -50,13 +56,19 @@ annotate my.Books with @( // Books Elements // annotate my.Books with { - ID @title:'{i18n>ID}' @UI.HiddenFilter; - title @title:'{i18n>Title}'; - genre @title:'{i18n>Genre}' @Common: { Text: genre.name, TextArrangement: #TextOnly }; - author @title:'{i18n>Author}' @Common: { Text: author.name, TextArrangement: #TextOnly }; - price @title:'{i18n>Price}' @Measures.ISOCurrency: currency_code; - stock @title:'{i18n>Stock}'; - descr @UI.MultiLineText; + ID @title : '{i18n>ID}' @UI.HiddenFilter; + title @title : '{i18n>Title}'; + genre @title : '{i18n>Genre}' @Common : { + Text : genre.name, + TextArrangement : #TextOnly + }; + author @title : '{i18n>Author}' @Common : { + Text : author.name, + TextArrangement : #TextOnly + }; + price @title : '{i18n>Price}' @Measures.ISOCurrency : currency_code; + stock @title : '{i18n>Stock}'; + descr @UI.MultiLineText; } //////////////////////////////////////////////////////////////////////////// @@ -64,42 +76,45 @@ annotate my.Books with { // Genres List // annotate my.Genres with @( - Common.SemanticKey: [name], - UI: { - SelectionFields: [ name ], - LineItem:[ - {Value: name}, - {Value: parent.name, Label: 'Main Genre'}, - ], - } + Common.SemanticKey : [name], + UI : { + SelectionFields : [name], + LineItem : [ + {Value : name}, + { + Value : parent.name, + Label : 'Main Genre' + }, + ], + } ); //////////////////////////////////////////////////////////////////////////// // // Genre Details // -annotate my.Genres with @( - UI: { - Identification: [{Value:name}], - HeaderInfo: { - TypeName: '{i18n>Genre}', - TypeNamePlural: '{i18n>Genres}', - Title: {Value: name}, - Description: {Value: ID} - }, - Facets: [ - {$Type: 'UI.ReferenceFacet', Label: '{i18n>SubGenres}', Target: 'children/@UI.LineItem'}, - ], - } -); +annotate my.Genres with @(UI : { + Identification : [{Value : name}], + HeaderInfo : { + TypeName : '{i18n>Genre}', + TypeNamePlural : '{i18n>Genres}', + Title : {Value : name}, + Description : {Value : ID} + }, + Facets : [{ + $Type : 'UI.ReferenceFacet', + Label : '{i18n>SubGenres}', + Target : 'children/@UI.LineItem' + }, ], +}); //////////////////////////////////////////////////////////////////////////// // // Genres Elements // annotate my.Genres with { - ID @title: '{i18n>ID}'; - name @title: '{i18n>Genre}'; + ID @title : '{i18n>ID}'; + name @title : '{i18n>Genre}'; } //////////////////////////////////////////////////////////////////////////// @@ -107,38 +122,37 @@ annotate my.Genres with { // Authors List // annotate my.Authors with @( - Common.SemanticKey: [name], - UI: { - Identification: [{Value:name}], - SelectionFields: [ name ], - LineItem:[ - {Value: ID}, - {Value: name}, - {Value: dateOfBirth}, - {Value: dateOfDeath}, - {Value: placeOfBirth}, - {Value: placeOfDeath}, - ], - } + Common.SemanticKey : [name], + UI : { + Identification : [{Value : name}], + SelectionFields : [name], + LineItem : [ + {Value : ID}, + {Value : name}, + {Value : dateOfBirth}, + {Value : dateOfDeath}, + {Value : placeOfBirth}, + {Value : placeOfDeath}, + ], + } ); //////////////////////////////////////////////////////////////////////////// // // Author Details // -annotate my.Authors with @( - UI: { - HeaderInfo: { - TypeName: '{i18n>Author}', - TypeNamePlural: '{i18n>Authors}', - Title: {Value: name}, - Description: {Value: dateOfBirth} - }, - Facets: [ - {$Type: 'UI.ReferenceFacet', Target: 'books/@UI.LineItem'}, - ], - } -); +annotate my.Authors with @(UI : { + HeaderInfo : { + TypeName : '{i18n>Author}', + TypeNamePlural : '{i18n>Authors}', + Title : {Value : name}, + Description : {Value : dateOfBirth} + }, + Facets : [{ + $Type : 'UI.ReferenceFacet', + Target : 'books/@UI.LineItem' + }, ], +}); //////////////////////////////////////////////////////////////////////////// @@ -146,12 +160,12 @@ annotate my.Authors with @( // Authors Elements // annotate my.Authors with { - ID @title:'{i18n>ID}' @UI.HiddenFilter; - name @title:'{i18n>Name}'; - dateOfBirth @title:'{i18n>DateOfBirth}'; - dateOfDeath @title:'{i18n>DateOfDeath}'; - placeOfBirth @title:'{i18n>PlaceOfBirth}'; - placeOfDeath @title:'{i18n>PlaceOfDeath}'; + ID @title : '{i18n>ID}' @UI.HiddenFilter; + name @title : '{i18n>Name}'; + dateOfBirth @title : '{i18n>DateOfBirth}'; + dateOfDeath @title : '{i18n>DateOfDeath}'; + placeOfBirth @title : '{i18n>PlaceOfBirth}'; + placeOfDeath @title : '{i18n>PlaceOfDeath}'; } //////////////////////////////////////////////////////////////////////////// @@ -159,99 +173,105 @@ annotate my.Authors with { // Languages List // annotate common.Languages with @( - Common.SemanticKey: [code], - Identification: [{Value:code}], - UI: { - SelectionFields: [ name, descr ], - LineItem:[ - {Value: code}, - {Value: name}, - ], - } + Common.SemanticKey : [code], + Identification : [{Value : code}], + UI : { + SelectionFields : [ + name, + descr + ], + LineItem : [ + {Value : code}, + {Value : name}, + ], + } ); //////////////////////////////////////////////////////////////////////////// // // Language Details // -annotate common.Languages with @( - UI: { - HeaderInfo: { - TypeName: '{i18n>Language}', - TypeNamePlural: '{i18n>Languages}', - Title: {Value: name}, - Description: {Value: descr} - }, - Facets: [ - {$Type: 'UI.ReferenceFacet', Label: '{i18n>Details}', Target: '@UI.FieldGroup#Details'}, - ], - FieldGroup#Details: { - Data: [ - {Value: code}, - {Value: name}, - {Value: descr} - ] - }, - } -); +annotate common.Languages with @(UI : { + HeaderInfo : { + TypeName : '{i18n>Language}', + TypeNamePlural : '{i18n>Languages}', + Title : {Value : name}, + Description : {Value : descr} + }, + Facets : [{ + $Type : 'UI.ReferenceFacet', + Label : '{i18n>Details}', + Target : '@UI.FieldGroup#Details' + }, ], + FieldGroup #Details : {Data : [ + {Value : code}, + {Value : name}, + {Value : descr} + ]}, +}); //////////////////////////////////////////////////////////////////////////// // // Currencies List // annotate common.Currencies with @( - Common.SemanticKey: [code], - Identification: [{Value:code}], - UI: { - SelectionFields: [ name, descr ], - LineItem:[ - {Value: descr}, - {Value: symbol}, - {Value: code}, - ], - } + Common.SemanticKey : [code], + Identification : [{Value : code}], + UI : { + SelectionFields : [ + name, + descr + ], + LineItem : [ + {Value : descr}, + {Value : symbol}, + {Value : code}, + ], + } ); //////////////////////////////////////////////////////////////////////////// // // Currency Details // -annotate common.Currencies with @( - UI: { - HeaderInfo: { - TypeName: '{i18n>Currency}', - TypeNamePlural: '{i18n>Currencies}', - Title: {Value: descr}, - Description: {Value: code} - }, - Facets: [ - {$Type: 'UI.ReferenceFacet', Label: '{i18n>Details}', Target: '@UI.FieldGroup#Details'}, - {$Type: 'UI.ReferenceFacet', Label: '{i18n>Extended}', Target: '@UI.FieldGroup#Extended'}, - ], - FieldGroup#Details: { - Data: [ - {Value: name}, - {Value: symbol}, - {Value: code}, - {Value: descr} - ] - }, - FieldGroup#Extended: { - Data: [ - {Value: numcode}, - {Value: minor}, - {Value: exponent} - ] - }, - } -); +annotate common.Currencies with @(UI : { + HeaderInfo : { + TypeName : '{i18n>Currency}', + TypeNamePlural : '{i18n>Currencies}', + Title : {Value : descr}, + Description : {Value : code} + }, + Facets : [ + { + $Type : 'UI.ReferenceFacet', + Label : '{i18n>Details}', + Target : '@UI.FieldGroup#Details' + }, + { + $Type : 'UI.ReferenceFacet', + Label : '{i18n>Extended}', + Target : '@UI.FieldGroup#Extended' + }, + ], + FieldGroup #Details : {Data : [ + {Value : name}, + {Value : symbol}, + {Value : code}, + {Value : descr} + ]}, + FieldGroup #Extended : {Data : [ + {Value : numcode}, + {Value : minor}, + {Value : exponent} + ]}, +}); //////////////////////////////////////////////////////////////////////////// // // Currencies Elements // annotate common.Currencies with { - numcode @title:'{i18n>NumCode}'; - minor @title:'{i18n>MinorUnit}'; - exponent @title:'{i18n>Exponent}'; + numcode @title : '{i18n>NumCode}'; + minor @title : '{i18n>MinorUnit}'; + exponent @title : '{i18n>Exponent}'; } From 2e13b3709617c0997fbab3e65de68793a57f8a26 Mon Sep 17 00:00:00 2001 From: Gregor Wolf Date: Fri, 12 Nov 2021 22:31:42 +0100 Subject: [PATCH 10/20] activate automatic load --- fiori/app/admin/webapp/manifest.json | 1 + fiori/app/authors/webapp/manifest.json | 1 + fiori/app/browse/webapp/manifest.json | 1 + 3 files changed, 3 insertions(+) diff --git a/fiori/app/admin/webapp/manifest.json b/fiori/app/admin/webapp/manifest.json index 25047c29..bdedd060 100644 --- a/fiori/app/admin/webapp/manifest.json +++ b/fiori/app/admin/webapp/manifest.json @@ -73,6 +73,7 @@ "options": { "settings" : { "entitySet" : "Books", + "initialLoad": true, "navigation" : { "Books" : { "detail" : { diff --git a/fiori/app/authors/webapp/manifest.json b/fiori/app/authors/webapp/manifest.json index 2d78a16e..f51a862d 100644 --- a/fiori/app/authors/webapp/manifest.json +++ b/fiori/app/authors/webapp/manifest.json @@ -68,6 +68,7 @@ "options": { "settings": { "entitySet": "Authors", + "initialLoad": true, "navigation": { "Authors": { "detail": { diff --git a/fiori/app/browse/webapp/manifest.json b/fiori/app/browse/webapp/manifest.json index 4a2e0a62..e2b4d3de 100644 --- a/fiori/app/browse/webapp/manifest.json +++ b/fiori/app/browse/webapp/manifest.json @@ -68,6 +68,7 @@ "options": { "settings": { "entitySet": "Books", + "initialLoad": true, "navigation": { "Books": { "detail": { From 14024a48375f7da50d9f07109adcedcd87d37d12 Mon Sep 17 00:00:00 2001 From: Gregor Wolf Date: Fri, 12 Nov 2021 22:31:58 +0100 Subject: [PATCH 11/20] add semantic object for navigation --- fiori/app/common.cds | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/fiori/app/common.cds b/fiori/app/common.cds index d262aaf5..eef74492 100644 --- a/fiori/app/common.cds +++ b/fiori/app/common.cds @@ -10,7 +10,7 @@ using {sap.common} from '@capire/common'; // Books Lists // annotate my.Books with @( - Common.SemanticKey : [title], + Common.SemanticKey : [ID], UI : { Identification : [{Value : title}], SelectionFields : [ @@ -36,7 +36,8 @@ annotate my.Books with @( ] } ) { - author @ValueList.entity : 'Authors'; + title @Common.SemanticObject : 'Books'; + author @ValueList.entity : 'Authors'; }; //////////////////////////////////////////////////////////////////////////// @@ -122,7 +123,7 @@ annotate my.Genres with { // Authors List // annotate my.Authors with @( - Common.SemanticKey : [name], + Common.SemanticKey : [ID], UI : { Identification : [{Value : name}], SelectionFields : [name], @@ -135,7 +136,9 @@ annotate my.Authors with @( {Value : placeOfDeath}, ], } -); +) { + name @Common.SemanticObject : 'Authors'; +}; //////////////////////////////////////////////////////////////////////////// // From 0093883f2553a665db772dc377a67482fc615de1 Mon Sep 17 00:00:00 2001 From: Gregor Wolf Date: Fri, 12 Nov 2021 23:46:41 +0100 Subject: [PATCH 12/20] add Author ID column --- fiori/app/browse/fiori-service.cds | 1 + fiori/app/common.cds | 1 + 2 files changed, 2 insertions(+) diff --git a/fiori/app/browse/fiori-service.cds b/fiori/app/browse/fiori-service.cds index 786a7864..a74d749f 100644 --- a/fiori/app/browse/fiori-service.cds +++ b/fiori/app/browse/fiori-service.cds @@ -43,6 +43,7 @@ annotate CatalogService.Books with @(UI : { ], LineItem : [ {Value : title}, + {Value : author.ID}, { Value : authorName, Label : '{i18n>Author}' diff --git a/fiori/app/common.cds b/fiori/app/common.cds index eef74492..d100c507 100644 --- a/fiori/app/common.cds +++ b/fiori/app/common.cds @@ -22,6 +22,7 @@ annotate my.Books with @( LineItem : [ {Value : ID}, {Value : title}, + {Value : author.ID}, { Value : author.name, Label : '{i18n>Author}' From 9fe16edc55bf7509da04c36821ffb2b57b057720 Mon Sep 17 00:00:00 2001 From: Gregor Wolf Date: Fri, 12 Nov 2021 23:48:26 +0100 Subject: [PATCH 13/20] fix manifest issues --- fiori/app/authors/webapp/manifest.json | 42 +++++++++++++++++++++++--- fiori/app/browse/webapp/manifest.json | 17 ++++++++--- 2 files changed, 51 insertions(+), 8 deletions(-) diff --git a/fiori/app/authors/webapp/manifest.json b/fiori/app/authors/webapp/manifest.json index f51a862d..7efe933c 100644 --- a/fiori/app/authors/webapp/manifest.json +++ b/fiori/app/authors/webapp/manifest.json @@ -1,11 +1,14 @@ { - "_version": "1.8.0", + "_version": "1.28.0", "sap.app": { "id": "authors", "type": "application", "title": "Browse Authors", "description": "Sample Application", "i18n": "i18n/i18n.properties", + "applicationVersion": { + "version": "1.0.0" + }, "dataSources": { "CatalogService": { "uri": "/browse/", @@ -15,14 +18,40 @@ } } }, - "-sourceTemplate": { + "sourceTemplate": { "id": "ui5template.basicSAPUI5ApplicationProject", "-id": "ui5template.smartTemplate", - "-version": "1.40.12" + "version": "1.40.12" + }, + "crossNavigation": { + "inbounds": { + "intent1": { + "signature": { + "parameters": { + "Books.author.ID":{ + "renameTo": "ID" + } + }, + "additionalParameters": "ignored" + }, + "semanticObject": "Authors", + "action": "display", + "title": "{{appTitle}}", + "info": "{{appInfo}}", + "subTitle": "{{appSubTitle}}", + "icon": "sap-icon://SAP-icons-TNT/user", + "indicatorDataSource": { + "dataSource": "CatalogService", + "path": "Authors/$count", + "refresh": 1800 + } + } + } } }, "sap.ui5": { "dependencies": { + "minUI5Version": "1.81.0", "libs": { "sap.fe.templates": {} } @@ -98,7 +127,12 @@ }, "sap.ui": { "technology": "UI5", - "fullWidth": false + "fullWidth": false, + "deviceTypes":{ + "desktop": true, + "tablet": true, + "phone": true + } }, "sap.fiori": { "registrationIds": [], diff --git a/fiori/app/browse/webapp/manifest.json b/fiori/app/browse/webapp/manifest.json index e2b4d3de..086a2abe 100644 --- a/fiori/app/browse/webapp/manifest.json +++ b/fiori/app/browse/webapp/manifest.json @@ -1,11 +1,14 @@ { - "_version": "1.8.0", + "_version": "1.28.0", "sap.app": { "id": "bookshop", "type": "application", "title": "Browse Books", "description": "Sample Application", "i18n": "i18n/i18n.properties", + "applicationVersion": { + "version": "1.0.0" + }, "dataSources": { "CatalogService": { "uri": "/browse/", @@ -15,14 +18,15 @@ } } }, - "-sourceTemplate": { + "sourceTemplate": { "id": "ui5template.basicSAPUI5ApplicationProject", "-id": "ui5template.smartTemplate", - "-version": "1.40.12" + "version": "1.40.12" } }, "sap.ui5": { "dependencies": { + "minUI5Version": "1.81.0", "libs": { "sap.fe.templates": {} } @@ -98,7 +102,12 @@ }, "sap.ui": { "technology": "UI5", - "fullWidth": false + "fullWidth": false, + "deviceTypes":{ + "desktop": true, + "tablet": true, + "phone": true + } }, "sap.fiori": { "registrationIds": [], From f5cb53adf841c48fd07d7ffc2cce3d423d4c4158 Mon Sep 17 00:00:00 2001 From: Gregor Wolf Date: Fri, 12 Nov 2021 23:48:51 +0100 Subject: [PATCH 14/20] add inbounds parameter --- fiori/app/appconfig/fioriSandboxConfig.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fiori/app/appconfig/fioriSandboxConfig.json b/fiori/app/appconfig/fioriSandboxConfig.json index 5b21b051..075ae333 100644 --- a/fiori/app/appconfig/fioriSandboxConfig.json +++ b/fiori/app/appconfig/fioriSandboxConfig.json @@ -14,7 +14,6 @@ "tiles": [ { "id": "BrowseBooks", - "size": "1×1", "tileType": "sap.ushell.ui.tile.StaticTile", "properties": { "title": "Browse Books", @@ -23,7 +22,6 @@ }, { "id": "BrowseAuthors", - "size": "1×1", "tileType": "sap.ushell.ui.tile.StaticTile", "properties": { "title": "Browse Authors", @@ -41,7 +39,6 @@ "tiles": [ { "id": "ManageBooks", - "size": "1×1", "tileType": "sap.ushell.ui.tile.StaticTile", "properties": { "title": "Manage Books", @@ -50,7 +47,6 @@ }, { "id": "ManageOrders", - "size": "1×1", "tileType": "sap.ushell.ui.tile.StaticTile", "properties": { "title": "Manage Orders", @@ -77,8 +73,12 @@ "action": "display", "title": "Browse Books", "signature": { - "parameters": {}, - "additionalParameters": "allowed" + "parameters": { + "Books.author.ID":{ + "renameTo": "ID" + } + }, + "additionalParameters": "ignored" }, "resolutionResult": { "applicationType": "SAPUI5", From 9aa604c5a0a18a88243890c587aaeb49ef842655 Mon Sep 17 00:00:00 2001 From: Gregor Wolf Date: Fri, 12 Nov 2021 23:56:11 +0100 Subject: [PATCH 15/20] remove @UI.HiddenFilter --- fiori/app/common.cds | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fiori/app/common.cds b/fiori/app/common.cds index d100c507..bb04d29f 100644 --- a/fiori/app/common.cds +++ b/fiori/app/common.cds @@ -58,7 +58,7 @@ annotate my.Books with @(UI : {HeaderInfo : { // Books Elements // annotate my.Books with { - ID @title : '{i18n>ID}' @UI.HiddenFilter; + ID @title : '{i18n>ID}'; title @title : '{i18n>Title}'; genre @title : '{i18n>Genre}' @Common : { Text : genre.name, @@ -164,7 +164,7 @@ annotate my.Authors with @(UI : { // Authors Elements // annotate my.Authors with { - ID @title : '{i18n>ID}' @UI.HiddenFilter; + ID @title : '{i18n>ID}'; name @title : '{i18n>Name}'; dateOfBirth @title : '{i18n>DateOfBirth}'; dateOfDeath @title : '{i18n>DateOfDeath}'; From 8350aff111910bb12c75789f37850e91048c585b Mon Sep 17 00:00:00 2001 From: Gregor Wolf Date: Sat, 13 Nov 2021 00:36:22 +0100 Subject: [PATCH 16/20] correct renameTo --- fiori/app/appconfig/fioriSandboxConfig.json | 13 +++++++--- fiori/app/browse/webapp/manifest.json | 28 +++++++++++++++++++++ 2 files changed, 38 insertions(+), 3 deletions(-) diff --git a/fiori/app/appconfig/fioriSandboxConfig.json b/fiori/app/appconfig/fioriSandboxConfig.json index 075ae333..b223b498 100644 --- a/fiori/app/appconfig/fioriSandboxConfig.json +++ b/fiori/app/appconfig/fioriSandboxConfig.json @@ -74,7 +74,10 @@ "title": "Browse Books", "signature": { "parameters": { - "Books.author.ID":{ + "Books.ID": { + "renameTo": "ID" + }, + "Authors.books.ID": { "renameTo": "ID" } }, @@ -91,8 +94,12 @@ "action": "display", "title": "Browse Authors", "signature": { - "parameters": {}, - "additionalParameters": "allowed" + "parameters": { + "Books.author.ID":{ + "renameTo": "ID" + } + }, + "additionalParameters": "ignored" }, "resolutionResult": { "applicationType": "SAPUI5", diff --git a/fiori/app/browse/webapp/manifest.json b/fiori/app/browse/webapp/manifest.json index 086a2abe..f6f9b348 100644 --- a/fiori/app/browse/webapp/manifest.json +++ b/fiori/app/browse/webapp/manifest.json @@ -22,6 +22,34 @@ "id": "ui5template.basicSAPUI5ApplicationProject", "-id": "ui5template.smartTemplate", "version": "1.40.12" + }, + "crossNavigation": { + "inbounds": { + "intent1": { + "signature": { + "parameters": { + "Books.ID":{ + "renameTo": "ID" + }, + "Authors.books.ID": { + "renameTo": "ID" + } + }, + "additionalParameters": "ignored" + }, + "semanticObject": "Books", + "action": "display", + "title": "{{appTitle}}", + "info": "{{appInfo}}", + "subTitle": "{{appSubTitle}}", + "icon": "sap-icon://course-book", + "indicatorDataSource": { + "dataSource": "CatalogService", + "path": "Books/$count", + "refresh": 1800 + } + } + } } }, "sap.ui5": { From b35e92b5bc6ba6720351b12b569a7b7d1547187a Mon Sep 17 00:00:00 2001 From: Gregor Wolf Date: Sat, 13 Nov 2021 00:41:28 +0100 Subject: [PATCH 17/20] TextArrangement : #TextOnly --- fiori/app/common.cds | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/fiori/app/common.cds b/fiori/app/common.cds index bb04d29f..4bb18d4b 100644 --- a/fiori/app/common.cds +++ b/fiori/app/common.cds @@ -20,11 +20,12 @@ annotate my.Books with @( currency_code ], LineItem : [ - {Value : ID}, - {Value : title}, - {Value : author.ID}, { - Value : author.name, + Value : ID, + Label : '{i18n>Title}' + }, + { + Value : author.ID, Label : '{i18n>Author}' }, {Value : genre.name}, @@ -37,7 +38,11 @@ annotate my.Books with @( ] } ) { - title @Common.SemanticObject : 'Books'; + ID @Common: { + SemanticObject : 'Books', + Text: title, + TextArrangement : #TextOnly + }; author @ValueList.entity : 'Authors'; }; @@ -138,7 +143,11 @@ annotate my.Authors with @( ], } ) { - name @Common.SemanticObject : 'Authors'; + ID @Common: { + SemanticObject : 'Authors', + Text: name, + TextArrangement : #TextOnly, + }; }; //////////////////////////////////////////////////////////////////////////// From cd914a8d872cbc1e7f398dffd2cddf561c47d89b Mon Sep 17 00:00:00 2001 From: Gregor Wolf Date: Sat, 13 Nov 2021 00:41:48 +0100 Subject: [PATCH 18/20] show ID in LineItem --- fiori/app/browse/fiori-service.cds | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/fiori/app/browse/fiori-service.cds b/fiori/app/browse/fiori-service.cds index a74d749f..486d706c 100644 --- a/fiori/app/browse/fiori-service.cds +++ b/fiori/app/browse/fiori-service.cds @@ -42,10 +42,12 @@ annotate CatalogService.Books with @(UI : { currency_code ], LineItem : [ - {Value : title}, - {Value : author.ID}, { - Value : authorName, + Value : ID, + Label : '{i18n>Title}' + }, + { + Value : author.ID, Label : '{i18n>Author}' }, {Value : genre.name}, From 6411ce4ea3d5ec3288dc028586602db863214e50 Mon Sep 17 00:00:00 2001 From: Gregor Wolf Date: Sat, 13 Nov 2021 00:48:04 +0100 Subject: [PATCH 19/20] remove redundant annotation --- fiori/app/authors/fiori-service.cds | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/fiori/app/authors/fiori-service.cds b/fiori/app/authors/fiori-service.cds index c3b0ec1a..4a16c735 100644 --- a/fiori/app/authors/fiori-service.cds +++ b/fiori/app/authors/fiori-service.cds @@ -27,20 +27,4 @@ annotate CatalogService.Authors with @(UI : { {Value : placeOfBirth}, {Value : placeOfDeath}, ]}, -}); - - -//////////////////////////////////////////////////////////////////////////// -// -// Authors List Page -// -annotate CatalogService.Authors with @(UI : { - SelectionFields : [ - ID, - name, - ], - LineItem : [ - {Value : ID}, - {Value : name}, - ] -}, ); +}); \ No newline at end of file From 7013cb6296da0de2d9e681fb79c8d104a9d1d9ed Mon Sep 17 00:00:00 2001 From: Gregor Wolf Date: Sat, 13 Nov 2021 00:48:13 +0100 Subject: [PATCH 20/20] remove name --- fiori/app/common.cds | 1 - 1 file changed, 1 deletion(-) diff --git a/fiori/app/common.cds b/fiori/app/common.cds index 4bb18d4b..b77bc2da 100644 --- a/fiori/app/common.cds +++ b/fiori/app/common.cds @@ -135,7 +135,6 @@ annotate my.Authors with @( SelectionFields : [name], LineItem : [ {Value : ID}, - {Value : name}, {Value : dateOfBirth}, {Value : dateOfDeath}, {Value : placeOfBirth},