Skip to content

Conversation

@etimr
Copy link
Contributor

@etimr etimr commented Dec 18, 2024

Provides an example of an hierarchy function as ListReport and ValueHelp

"tableSettings": {
     "type": "TreeTable",
     "hierarchyQualifier": "NodesHierarchy",
   ...
}
  • to enable tree table for ValueHelp hierarchical entity should be annotated with PresentationVariant and root entity with PresentationVariantQualifier

etimr and others added 28 commits November 13, 2024 17:25
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 <olena.timrova@sap.com>
Co-authored-by: D070615 <olena.timrova@sap.com>
Co-authored-by: D070615 <olena.timrova@sap.com>
Co-authored-by: D070615 <olena.timrova@sap.com>
Support of ExpandLevels in custom code

---------

Co-authored-by: D070615 <olena.timrova@sap.com>
Co-authored-by: D070615 <olena.timrova@sap.com>
Co-authored-by: D070615 <olena.timrova@sap.com>
Co-authored-by: Evgeny Andreev <evgeny.andreev@sap.com>
Co-authored-by: Adrian Görler <adrian.goerler@sap.com>
Co-authored-by: Evgeny Andreev <eugene.andreev@gmail.com>
@cla-assistant
Copy link

cla-assistant bot commented Dec 18, 2024

CLA assistant check
All committers have signed the CLA.

@cla-assistant
Copy link

cla-assistant bot commented Dec 18, 2024

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
3 out of 4 committers have signed the CLA.

✅ etimr
✅ agoerler
✅ eugene-andreev
❌ OlenaTi
You have signed the CLA already but the status is still pending? Let us recheck it.

@agoerler agoerler merged commit bde2090 into main Dec 19, 2024
1 of 2 checks passed
@agoerler agoerler deleted the feature-tree-table branch December 19, 2024 09:39
/**
* Hierarchically organized Code List for Genres
*/
entity Genres : sap.common.CodeList {
Copy link
Contributor

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?

Copy link
Contributor

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?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

@etimr etimr Dec 19, 2024

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)


### Testing in hybrid mode

You can test the `GenreHierarchyTest` on H2 using the profile `default` as well as on HANA using the profile `hybrid`
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants