-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Demonstrate Hierarchy Functions (#416)
Provides an example of an hierarchy function as `ListReport` and `ValueHelp` - currently only `READ` - to [enable tree tables](https://ui5.sap.com//#/topic/7cf7a31fd1ee490ab816ecd941bd2f1f) as `ListReport` add to `manifest.json`: ``` "tableSettings": { "type": "TreeTable", "hierarchyQualifier": "NodesHierarchy", ... } ``` - to enable tree table for ValueHelp hierarchical entity should be annotated with `PresentationVariant` and root entity with `PresentationVariantQualifier` --------- Co-authored-by: D070615 <[email protected]> Co-authored-by: Adrian Görler <[email protected]> Co-authored-by: Evgeny Andreev <[email protected]>
- Loading branch information
1 parent
a195f0e
commit bde2090
Showing
24 changed files
with
1,103 additions
and
141 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* | ||
UI annotations for the Browse GenreHierarchy App | ||
*/ | ||
|
||
using AdminService from '../../srv/admin-service'; | ||
|
||
|
||
annotate AdminService.GenreHierarchy with @Aggregation.RecursiveHierarchy#GenreHierarchy: { | ||
$Type: 'Aggregation.RecursiveHierarchyType', | ||
NodeProperty: ID, // identifies a node | ||
ParentNavigationProperty: parent // navigates to a node's parent | ||
}; | ||
|
||
annotate AdminService.GenreHierarchy with @Hierarchy.RecursiveHierarchy#GenreHierarchy: { | ||
$Type: 'Hierarchy.RecursiveHierarchyType', | ||
// ExternalKey : null, | ||
LimitedDescendantCount: LimitedDescendantCount, | ||
DistanceFromRoot: DistanceFromRoot, | ||
DrillState: DrillState, | ||
Matched: Matched, | ||
MatchedDescendantCount: MatchedDescendantCount, | ||
LimitedRank: LimitedRank | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"name": "genres", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"keywords": [], | ||
"author": "", | ||
"license": "ISC" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
sap.ui.define(["sap/fe/core/AppComponent"], ac => ac.extend("genres.Component", { | ||
metadata:{ manifest:'json' } | ||
})) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
appTitle=Browse Genres | ||
appDescription=Genres as Tree View |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
appTitle=Zeige Genres | ||
appDescription=Genres als Baumansicht |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<title>Browse Genres</title> | ||
<style> | ||
html, body, body > div, #container, #container-uiarea { | ||
height: 100%; | ||
} | ||
</style> | ||
<script | ||
id="sap-ui-bootstrap" | ||
src="https://sapui5.hana.ondemand.com/resources/sap-ui-core.js" | ||
data-sap-ui-theme="sap_fiori_3" | ||
data-sap-ui-resourceroots='{ | ||
"genres": "./" | ||
}' | ||
data-sap-ui-oninit="module:sap/ui/core/ComponentSupport" | ||
data-sap-ui-compatVersion="edge" | ||
data-sap-ui-async="true" | ||
data-sap-ui-frameOptions="trusted" | ||
></script> | ||
</head> | ||
<body class="sapUiBody sapUiSizeCompact" id="content"> | ||
<div | ||
data-sap-ui-component | ||
data-name="genres" | ||
data-id="container" | ||
data-settings='{"id" : "genres"}' | ||
data-handle-validation="true" | ||
></div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
{ | ||
"_version": "1.8.0", | ||
"sap.app": { | ||
"id": "genres", | ||
"type": "application", | ||
"title": "{{appTitle}}", | ||
"description": "{{appDescription}}", | ||
"applicationVersion": { | ||
"version": "1.0.0" | ||
}, | ||
"dataSources": { | ||
"AdminService": { | ||
"uri": "/api/admin/", | ||
"type": "OData", | ||
"settings": { | ||
"odataVersion": "4.0" | ||
} | ||
} | ||
}, | ||
"-sourceTemplate": { | ||
"id": "ui5template.basicSAPUI5ApplicationProject", | ||
"-id": "ui5template.smartTemplate", | ||
"-version": "1.40.12" | ||
}, | ||
"crossNavigation": { | ||
"inbounds": { | ||
"Genres-show": { | ||
"signature": { | ||
"parameters": {}, | ||
"additionalParameters": "allowed" | ||
}, | ||
"semanticObject": "GenreHierarchy", | ||
"action": "show" | ||
} | ||
} | ||
} | ||
}, | ||
"sap.ui5": { | ||
"dependencies": { | ||
"minUI5Version": "1.122.0", | ||
"libs": { | ||
"sap.fe.templates": {} | ||
} | ||
}, | ||
"models": { | ||
"i18n": { | ||
"type": "sap.ui.model.resource.ResourceModel", | ||
"uri": "i18n/i18n.properties" | ||
}, | ||
"": { | ||
"dataSource": "AdminService", | ||
"settings": { | ||
"synchronizationMode": "None", | ||
"operationMode": "Server", | ||
"autoExpandSelect" : true, | ||
"earlyRequests": true, | ||
"groupProperties": { | ||
"default": { | ||
"submit": "Auto" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"routing": { | ||
"routes": [ | ||
{ | ||
"pattern": ":?query:", | ||
"name": "GenreHierarchyList", | ||
"target": "GenreHierarchyList" | ||
}, | ||
{ | ||
"pattern": "GenreHierarchy({key}):?query:", | ||
"name": "GenreHierarchyDetails", | ||
"target": "GenreHierarchyDetails" | ||
} | ||
], | ||
"targets": { | ||
"GenreHierarchyList": { | ||
"type": "Component", | ||
"id": "GenreHierarchyList", | ||
"name": "sap.fe.templates.ListReport", | ||
"options": { | ||
"settings" : { | ||
"entitySet" : "GenreHierarchy", | ||
"navigation" : { | ||
"GenreHierarchy" : { | ||
"detail" : { | ||
"route" : "GenreHierarchyDetails" | ||
} | ||
} | ||
}, | ||
"controlConfiguration": { | ||
"@com.sap.vocabularies.UI.v1.LineItem": { | ||
"tableSettings": { | ||
"hierarchyQualifier": "GenreHierarchy", | ||
"type": "TreeTable" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"GenreHierarchyDetails": { | ||
"type": "Component", | ||
"id": "GenreHierarchyDetails", | ||
"name": "sap.fe.templates.ObjectPage", | ||
"options": { | ||
"settings" : { | ||
"entitySet": "GenreHierarchy" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"contentDensities": { | ||
"compact": true, | ||
"cozy": true | ||
} | ||
}, | ||
"sap.ui": { | ||
"technology": "UI5", | ||
"fullWidth": false | ||
}, | ||
"sap.fiori": { | ||
"registrationIds": [], | ||
"archeType": "transactional" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.