Fiori Tree Views towards GA#839
Conversation
| // PoC for simplified Fiori Tree Views | ||
| const cds = require('@sap/cds/lib') | ||
|
|
||
| cds.on('compile.to.edmx', csn => { |
There was a problem hiding this comment.
Also for @Aggregation.RecursiveHierarchy?
There was a problem hiding this comment.
Yes, if we replace that by a simplified shortcut, e.g. like that:
annotate AdminService.Genres with @Fiori.TreeView #GenreHierarchy .via: parent;
annotate AdminService.Genres with @Fiori.TreeView #GenreHierarchy { via: parent };If there's only one Association to self:
annotate AdminService.Genres with @Fiori.TreeView #GenreHierarchy;|
P.S. We can also use the |
| LimitedDescendantCount : Int16 = null; | ||
| LimitedRank : Int16 = null; | ||
| DistanceFromRoot : Int16 = null; |
There was a problem hiding this comment.
Here I also tried changing Int64 types to Int16 as discussed → seems to work end-to-end for Fiori clients.
|
Leftover: We also need to check and document how to do Value Helps: cloud-cap-samples/fiori/app/admin-books/fiori-service.cds Lines 70 to 81 in 987611b |
| Capabilities.FilterRestrictions.NonFilterableProperties: [ | ||
| 'LimitedDescendantCount', | ||
| 'DistanceFromRoot', | ||
| 'DrillState', | ||
| 'LimitedRank' | ||
| ], | ||
| // Disallow sorting on these properties from Fiori UIs | ||
| Capabilities.SortRestrictions.NonSortableProperties : [ | ||
| 'LimitedDescendantCount', | ||
| 'DistanceFromRoot', | ||
| 'DrillState', | ||
| 'LimitedRank' | ||
| ], | ||
| ) columns { // Ensure we can query these fields from database | ||
| null as LimitedDescendantCount : Int16, | ||
| null as DistanceFromRoot : Int16, | ||
| null as DrillState : String, | ||
| null as LimitedRank : Int16, | ||
| }; |
There was a problem hiding this comment.
We should capture these as a reusable aspect. Unfortunately, an aspect can't have virtual or computed elements.
No description provided.