forked from SAP-samples/cloud-cap-samples-java
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fiori-service.cds
90 lines (88 loc) · 2.11 KB
/
fiori-service.cds
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
/*
Annotations for the Browse Books App
*/
using ReviewService from '../../srv/review-service';
annotate ReviewService.Reviews with @(UI : {
HeaderInfo : {
TypeName : '{i18n>Review}',
TypeNamePlural : '{i18n>Reviews}',
Title : {Value : title},
Description : {Value : createdBy},
},
PresentationVariant : {
Text : 'Default',
SortOrder : [{
Property : modifiedAt,
Descending : true
}],
Visualizations : ['@UI.LineItem']
},
SelectionFields : [
book_ID,
rating
],
HeaderFacets : [{
$Type : 'UI.ReferenceFacet',
Target : '@UI.DataPoint#rating'
}, ],
Facets : [
{
$Type : 'UI.ReferenceFacet',
Target : '@UI.FieldGroup#General',
Label : '{i18n>General}'
},
{
$Type : 'UI.ReferenceFacet',
Target : '@UI.FieldGroup#Review',
Label : '{i18n>Review}',
}
],
FieldGroup #General : {Data : [
{
Value : createdAt,
Label : '{i18n>Created}'
},
{
Value : createdBy,
Label : '{i18n>CreatedBy}'
},
{
Value : modifiedAt,
Label : '{i18n>Modified}'
},
{
Value : modifiedBy,
Label : '{i18n>ModifiedBy}'
},
{Value : book_ID},
]},
FieldGroup #Review : {Data : [
{
Value : rating,
Label : '{i18n>Rating}'
},
{
Value : title,
Label : '{i18n>Title}'
},
{
Value : text,
Label : '{i18n>Text}'
}
]},
FieldGroup #BookAndAuthor : {Data : [
{Value : book.title},
{Value : book.author.name}
]},
DataPoint #rating : {
Title : '{i18n>Rating}',
Value : rating,
Visualization : #Rating,
MinimumValue : 0,
MaximumValue : 5
}
}) {
rating @title : '{i18n>Rating}';
title @title : '{i18n>Title}';
text @title : '{i18n>Text}' @UI.MultiLineText;
};