Skip to content

Conversation

@etimr
Copy link
Contributor

@etimr etimr commented Oct 30, 2024

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. 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
"tableSettings": {
     "type": "TreeTable",
     "hierarchyQualifier": "NodesHierarchy",
   ...
}
  • to enable tree table for ValueHelp hierarchical entity should be annotated with PresentationVariant and root entity with PresentationVariantQualifier

@cla-assistant
Copy link

cla-assistant bot commented Oct 30, 2024

CLA assistant check
All committers have signed the CLA.

@cla-assistant
Copy link

cla-assistant bot commented Oct 30, 2024

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@etimr etimr marked this pull request as ready for review November 11, 2024 14:29
@etimr etimr added the ☠️ do not merge ☠️ Do not merge PR label Nov 13, 2024
@etimr etimr changed the base branch from main to feature-tree-table November 13, 2024 10:19
@etimr etimr removed the ☠️ do not merge ☠️ Do not merge PR label Nov 13, 2024
on children.parent = $self;
entity Genres {
key ID : Integer;
node : Integer not null;
Copy link
Contributor

Choose a reason for hiding this comment

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

why do we add the node element?

Copy link
Contributor Author

@etimr etimr Nov 13, 2024

Choose a reason for hiding this comment

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

I need an additional field for the association:
Association to one Genres on parent.node = parent_node;
as we discussed, following doesn't work yet:
Association to one Genres on parent.ID = parent_node;

entity Genres {
key ID : Integer;
node : Integer not null;
parent_node : Integer default 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

we can get rid of the parent_node FK element with @eugene-andreev 's upcoming change.

22;21;Autobiography
23;20;Essay
24;20;Speech
ID;parent_node;name;node
Copy link
Contributor

Choose a reason for hiding this comment

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

the information in the ID and node column is redundant

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, because I can't use the key ID in the association -> will be removed with the change of @eugene-andreev

Comment on lines +17 to +22
LimitedDescendantCount: LimitedDescendantCount,
DistanceFromRoot: DistanceFromRoot,
DrillState: DrillState,
Matched: Matched,
MatchedDescendantCount: MatchedDescendantCount,
LimitedRank: LimitedRank
Copy link
Contributor

Choose a reason for hiding this comment

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

we need to check if we need this annotation if we don't rename anything

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree, it looks the same in the example I got from Gwendal (no renaming), but I can't find confirmation in the documentation -> ask UI colleagues

@etimr etimr merged commit 16c919d into SAP-samples:feature-tree-table Nov 13, 2024
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.

2 participants