Skip to content

Commit a84c110

Browse files
committed
new ui and change in h2 handler
1 parent 0fb97de commit a84c110

File tree

21 files changed

+304
-126
lines changed

21 files changed

+304
-126
lines changed

app/appconfig/fioriSandboxConfig.json

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
"title": "Browse Books",
2121
"description": "Find your favorite book"
2222
}
23-
}, {
23+
},
24+
{
2425
"id": "browse-genres",
2526
"tileType": "sap.ushell.ui.tile.StaticTile",
2627
"properties": {
@@ -64,6 +65,15 @@
6465
"title": "Manage Reviews",
6566
"description": "Add/edit/delete reviews"
6667
}
68+
},
69+
{
70+
"id": "manage-genres",
71+
"tileType": "sap.ushell.ui.tile.StaticTile",
72+
"properties": {
73+
"targetURL": "#Genres-manage",
74+
"title": "Manage Genres",
75+
"description": "Add/edit/delete genres"
76+
}
6777
}
6878
]
6979
},
@@ -129,8 +139,8 @@
129139
},
130140
"resolutionResult": {
131141
"applicationType": "SAPUI5",
132-
"additionalInformation": "SAPUI5.Component=genres",
133-
"url": "/genres/webapp"
142+
"additionalInformation": "SAPUI5.Component=browse-genres",
143+
"url": "/browse-genres/webapp"
134144
}
135145
},
136146
"manage-books": {
@@ -146,6 +156,19 @@
146156
"url": "/admin/webapp"
147157
}
148158
},
159+
"manage-genres": {
160+
"semanticObject": "Genres",
161+
"action": "manage",
162+
"signature": {
163+
"parameters": {},
164+
"additionalParameters": "allowed"
165+
},
166+
"resolutionResult": {
167+
"applicationType": "SAPUI5",
168+
"additionalInformation": "SAPUI5.Component=genres",
169+
"url": "/genres/webapp"
170+
}
171+
},
149172
"manage-orders": {
150173
"semanticObject": "Orders",
151174
"action": "manage",
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*
2+
UI annotations for the Browse GenreHierarchy App
3+
*/
4+
5+
using CatalogService from '../../srv/cat-service';
6+
7+
8+
annotate CatalogService.GenreHierarchy with @Aggregation.RecursiveHierarchy#GenreHierarchy: {
9+
$Type: 'Aggregation.RecursiveHierarchyType',
10+
NodeProperty: ID, // identifies a node
11+
ParentNavigationProperty: parent // navigates to a node's parent
12+
};
13+
14+
annotate CatalogService.GenreHierarchy with @Hierarchy.RecursiveHierarchy#GenreHierarchy: {
15+
$Type: 'Hierarchy.RecursiveHierarchyType',
16+
LimitedDescendantCount: LimitedDescendantCount,
17+
DistanceFromRoot: DistanceFromRoot,
18+
DrillState: DrillState,
19+
Matched: Matched,
20+
MatchedDescendantCount: MatchedDescendantCount,
21+
LimitedRank: LimitedRank
22+
};

app/browse-genres/package.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"name": "browse-genres",
3+
"version": "1.0.0",
4+
"description": "",
5+
"main": "index.js",
6+
"scripts": {
7+
"test": "echo \"Error: no test specified\" && exit 1"
8+
},
9+
"keywords": [],
10+
"author": "",
11+
"license": "ISC"
12+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
sap.ui.define(["sap/fe/core/AppComponent"], ac => ac.extend("browse-genres.Component", {
2+
metadata:{ manifest:'json' }
3+
}))
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
appTitle=Browse Genres
2+
appDescription=Genres as Tree View
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
appTitle=Zeige Genres
2+
appDescription=Genres als Baumansicht
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
7+
<title>Browse Genres</title>
8+
<style>
9+
html, body, body > div, #container, #container-uiarea {
10+
height: 100%;
11+
}
12+
</style>
13+
<script
14+
id="sap-ui-bootstrap"
15+
src="https://sapui5.hana.ondemand.com/resources/sap-ui-core.js"
16+
data-sap-ui-theme="sap_fiori_3"
17+
data-sap-ui-resourceroots='{
18+
"browse-genres": "./"
19+
}'
20+
data-sap-ui-oninit="module:sap/ui/core/ComponentSupport"
21+
data-sap-ui-compatVersion="edge"
22+
data-sap-ui-async="true"
23+
data-sap-ui-frameOptions="trusted"
24+
></script>
25+
</head>
26+
<body class="sapUiBody sapUiSizeCompact" id="content">
27+
<div
28+
data-sap-ui-component
29+
data-name="browse-genres"
30+
data-id="container"
31+
data-settings='{"id" : "browse-genres"}'
32+
data-handle-validation="true"
33+
></div>
34+
</body>
35+
</html>
Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
{
2+
"_version": "1.8.0",
3+
"sap.app": {
4+
"id": "browse-genres",
5+
"type": "application",
6+
"title": "{{appTitle}}",
7+
"description": "{{appDescription}}",
8+
"applicationVersion": {
9+
"version": "1.0.0"
10+
},
11+
"dataSources": {
12+
"CatalogService": {
13+
"uri": "/api/browse/",
14+
"type": "OData",
15+
"settings": {
16+
"odataVersion": "4.0"
17+
}
18+
}
19+
},
20+
"-sourceTemplate": {
21+
"id": "ui5template.basicSAPUI5ApplicationProject",
22+
"-id": "ui5template.smartTemplate",
23+
"-version": "1.40.12"
24+
},
25+
"crossNavigation": {
26+
"inbounds": {
27+
"Genres-show": {
28+
"signature": {
29+
"parameters": {},
30+
"additionalParameters": "allowed"
31+
},
32+
"semanticObject": "GenreHierarchy",
33+
"action": "show"
34+
}
35+
}
36+
}
37+
},
38+
"sap.ui5": {
39+
"dependencies": {
40+
"minUI5Version": "1.122.0",
41+
"libs": {
42+
"sap.fe.templates": {}
43+
}
44+
},
45+
"models": {
46+
"i18n": {
47+
"type": "sap.ui.model.resource.ResourceModel",
48+
"uri": "i18n/i18n.properties"
49+
},
50+
"": {
51+
"dataSource": "CatalogService",
52+
"settings": {
53+
"synchronizationMode": "None",
54+
"operationMode": "Server",
55+
"autoExpandSelect" : true,
56+
"earlyRequests": true,
57+
"groupProperties": {
58+
"default": {
59+
"submit": "Auto"
60+
}
61+
}
62+
}
63+
}
64+
},
65+
"routing": {
66+
"routes": [
67+
{
68+
"pattern": ":?query:",
69+
"name": "GenreHierarchyList",
70+
"target": "GenreHierarchyList"
71+
},
72+
{
73+
"pattern": "GenreHierarchy({key}):?query:",
74+
"name": "GenreHierarchyDetails",
75+
"target": "GenreHierarchyDetails"
76+
}
77+
],
78+
"targets": {
79+
"GenreHierarchyList": {
80+
"type": "Component",
81+
"id": "GenreHierarchyList",
82+
"name": "sap.fe.templates.ListReport",
83+
"options": {
84+
"settings" : {
85+
"entitySet" : "GenreHierarchy",
86+
"navigation" : {
87+
"GenreHierarchy" : {
88+
"detail" : {
89+
"route" : "GenreHierarchyDetails"
90+
}
91+
}
92+
},
93+
"controlConfiguration": {
94+
"@com.sap.vocabularies.UI.v1.LineItem": {
95+
"tableSettings": {
96+
"hierarchyQualifier": "GenreHierarchy",
97+
"type": "TreeTable"
98+
}
99+
}
100+
}
101+
}
102+
}
103+
},
104+
"GenreHierarchyDetails": {
105+
"type": "Component",
106+
"id": "GenreHierarchyDetails",
107+
"name": "sap.fe.templates.ObjectPage",
108+
"options": {
109+
"settings" : {
110+
"entitySet": "GenreHierarchy"
111+
}
112+
}
113+
}
114+
}
115+
},
116+
"contentDensities": {
117+
"compact": true,
118+
"cozy": true
119+
}
120+
},
121+
"sap.ui": {
122+
"technology": "UI5",
123+
"fullWidth": false
124+
},
125+
"sap.fiori": {
126+
"registrationIds": [],
127+
"archeType": "transactional"
128+
}
129+
}

app/browse/fiori-service.cds

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,19 @@ annotate CatalogService.Reviews with @(UI : {
161161
]}
162162
});
163163

164+
annotate CatalogService.GenreHierarchy with @UI: {
165+
PresentationVariant : {
166+
$Type : 'UI.PresentationVariantType',
167+
RequestAtLeast: [name],
168+
Visualizations: ['@UI.LineItem', ],
169+
},
170+
LineItem : [{
171+
$Type: 'UI.DataField',
172+
Value: name,
173+
Label : 'Genre'
174+
}],
175+
};
176+
164177
annotate CatalogService.Books actions {
165178
@(
166179
Common.SideEffects : {

app/fiori.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
};
1515
</script>
1616

17-
<script id="sap-ushell-bootstrap" src="https://sapui5.hana.ondemand.com/1.131.0/test-resources/sap/ushell/bootstrap/sandbox.js"></script>
18-
<script id="sap-ui-bootstrap" src="https://sapui5.hana.ondemand.com/1.131.0/resources/sap-ui-core.js"
17+
<script id="sap-ushell-bootstrap" src="https://sapui5untested.int.sap.eu2.hana.ondemand.com/test-resources/sap/ushell/bootstrap/sandbox.js"></script>
18+
<script id="sap-ui-bootstrap" src="https://sapui5untested.int.sap.eu2.hana.ondemand.com/resources/sap-ui-core.js"
1919
data-sap-ui-libs="sap.m, sap.ushell, sap.collaboration, sap.ui.layout"
2020
data-sap-ui-compatVersion="edge"
2121
data-sap-ui-theme="sap_horizon"

0 commit comments

Comments
 (0)