cancel
Showing results for 
Search instead for 
Did you mean: 

Bind OData model to Tree-table

10-02-2018 6:39 PM
oded79282 Explorer
6400 views 6 comments Go to solution
0 Likes
SAP Managed Tags
Subscribe

Hi,

i am trying to bind a odata model to the TreeTable. i don't know what i did wrong it's not showing the data in TreeTable. i am not even sure whether it is a right way to bind the treatable, if not how can i get the TreeTable populated with following Odata ?

TreeTable:

OData :

0 Likes

Accepted Solutions (1)

Accepted Solutions (1)

VictorHo
Participant

Hi Ashok,

As for as I know, tree table is not designed to working with OData service, since this model does not have a tree structure like JSON, but using deep entity (with navigation property) instead.

I suggest that you get the data from OData service, then store in a JSON model. Then you can bind this JSON model to the tree table. It should work and it's easier for you to customize the table.

Regards,

Victor.

Answers (4)

Answers (4)

imsuryapandiyan
Participant

Hi Ashok,

Try this:

rows="{
            path : 'modelTree>/WBS_HierarchySet',
            parameters : {
                countMode: 'Inline',
                treeAnnotationProperties : {
                    hierarchyLevelFor : 'modelTree>Level',
                    hierarchyNodeFor : 'modelTree>WbsElement',
                    hierarchyParentNodeFor : 'modelTree>Up'
                }
            }
        }"

Regards,

Suriya

0 Likes

Additionally the property 'hierarchyDrillStateFor' has to be set. The information should also be provided by the BES Model

treeAnnotationProperties : { 
hierarchyLevelFor : 'HierarchyLevel',
hierarchyNodeFor : 'NodeId',
hierarchyParentNodeFor : 'ParentId',
hierarchyDrillStateFor: 'DrillState'
}

Best regards

Christian

Hi Ashok,

Were you able to resolve the issue? I was able to get the Odata map to a local JSON and display the table information. However the table is displaying a flat structure and I am not able to show the children under the parents. The columns names I have used is correct. But I am not sure why the Tree annotation is now working as I am expecting it to work like how Suriya had provided the below sample. Please any advise on how to perform the tree notation from a local json object that will be great.

treeAnnotationProperties :{
                    hierarchyLevelFor :'modelTree>Level',
                    hierarchyNodeFor :'modelTree>WbsElement',
                    hierarchyParentNodeFor :'modelTree>Up'
krishnadhuriya
Explorer
0 Likes

If using any parameters like countmode:inline. , Make sure oData call fulfill this request or else remove that line from it

Sharathmg
Active Contributor
0 Likes

Hi Ashok,

Firstly, do you observe any errors in the console of the browser.