diff --git a/app/admin-books/fiori-service.cds b/app/admin-books/fiori-service.cds index 8dcce5f..07ca9fb 100644 --- a/app/admin-books/fiori-service.cds +++ b/app/admin-books/fiori-service.cds @@ -98,7 +98,21 @@ annotate AdminService.Books.texts with { // Add Value Help for Locales annotate AdminService.Books.texts { locale @( - ValueList.entity:'Languages', Common.ValueListWithFixedValues, //show as drop down, not a dialog + Common.ValueList : { + CollectionPath: 'Languages', + Parameters : [ + { + $Type : 'Common.ValueListParameterDisplayOnly', + ValueListProperty: 'code', + }, + { + $Type : 'Common.ValueListParameterInOut', + LocalDataProperty: locale, + ValueListProperty: 'code', + } + ], + }, + Common.ValueListWithFixedValues, //show as drop down, not a dialog ) } // In addition we need to expose Languages through AdminService as a target for ValueList diff --git a/app/common.cds b/app/common.cds index 926be66..1863d06 100644 --- a/app/common.cds +++ b/app/common.cds @@ -34,9 +34,10 @@ annotate my.Books with @( Text: title, TextArrangement : #TextOnly }; - author @ValueList.entity : 'Authors'; }; +annotate my.Authors with @cds.odata.valuelist; + annotate common.Currencies with { symbol @Common.Label : '{i18n>Currency}'; }