I am trying to bind OData to a Tree Table following the OData Samples in sap.ui.table.TreeTable
I have tried both with basic binding with setting treeAnnotationProperties
in the xml and annotation binding (I have checked the $metadata
query and it has the sap:hierarchy-
etc).
However, both times I get repeated nodes like:
Id | Title | Hierarchy Level | ParentID
----------------------------------------------------
1 | izparent | 0 | 0
|--1 | izparent | 0 | 0
| |-- ...
|--2 | izchild | 1 | 1
2 | izchild | 1 | 1
where I get a Node with Id 1 which is expandable, and Node 2 which is not expandable. But if I expand Node 1, I again get Node 1 which is expandable and Node 2, and I can repeated expand Node 1 to get the same result.
I have a feeling I have a similar problem as here, but there is no answer provided for this either: How to define tree table annotation (XML view)
I am using OData Version 2.0 and for my et_entity
I just provide a SELECT * FROM
a table which has the structure I think I need according to the samples.
Table content:
Id | Title | HierarchyLevel | ParentID | Drillstate
1 izparent 0 0 expanded
2 izchild 1 1 leaf
What could be the issue here?