-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Demonstrate Hierarchy Functions #416
Conversation
Provides an example of an hierarchy function as `ListReport` and `ValueHelp` - currently only READ - only on HANA Changes: - `LineItem parent.name` is removed from `app/common.cds`, because it leads to OData requests with `$expand` for an hierarchy function which are not supported yet - `sap.common.CodeList` aspect was removed from `Genres` entity because it provides `ValueHelp` dialog implicitly through annotation [@cds.odata.valuelist](https://pages.github.tools.sap/cap/docs/advanced/fiori#convenience-option-cds-odata-valuelist). It also uses the annotation `@cds.autoexpose`, because of this entity `Genres` should be exposed explicitly in `CatalogService` and `ReviewService` after `sap.common.CodeList` is removed. - renaming in the view `GenreHierarchy` is temporal and will be solved by CAP Java team in the future ``` node as node_id, parent_node as parent_id ``` - 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: D070615 <[email protected]>
Co-authored-by: D070615 <[email protected]>
Co-authored-by: D070615 <[email protected]>
Support of ExpandLevels in custom code --------- Co-authored-by: D070615 <[email protected]>
Co-authored-by: D070615 <[email protected]>
Co-authored-by: D070615 <[email protected]> Co-authored-by: Evgeny Andreev <[email protected]> Co-authored-by: Adrian Görler <[email protected]> Co-authored-by: Evgeny Andreev <[email protected]>
|
1 similar comment
|
} | ||
|
||
/** | ||
* Hierarchically organized Code List for Genres | ||
*/ | ||
entity Genres : sap.common.CodeList { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why can't you use CodeList from sap.common?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@OlenaTi - do you recall why we changed this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
short version: because it provides a standart ValueHelp
dialog and doesn't allow to customize it for Tree Tables,
a little bit more explained: #388 (comment)
@@ -138,6 +141,14 @@ are defined for local development: | |||
- User: `user`, password: `user` to browse books | |||
- User: `admin`, password: `admin` to manage books and orders | |||
|
|||
### Testing in hybrid mode | |||
|
|||
You can test the `GenreHierarchyTest` on H2 using the profile `default` as well as on HANA using the profile `hybrid` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather recommend usage of existing profiles in application.yaml, e.g. cloud
, which expects HANA.
Provides an example of an hierarchy function as
ListReport
andValueHelp
READ
ListReport
add tomanifest.json
:PresentationVariant
and root entity withPresentationVariantQualifier