Implementing tree structure in Sapui5 and restricting parent property


Note that “sap.ui.model.ClientTreeBinding” which is used by TreeTable in JSONModel or XMLModel supports the parameter arrayNames. You need to pass an array of the model property names to create a sublevel. I would suggest to try below:

In XML view:

<TreeTable rows="{path: '/pathToData', parameters: { arrayNames: ['children'] } }" >
     ...
</TreeTable>

In JSON view:

treeTable.bindRows({path: '/pathToData', parameters: { arrayNames: ['children'] }});

For more details about SAPui5 tree structure, you can navigate to following link:

https://sapui5.netweaver.ondemand.com/sdk/test-resources/sap/ui/table/TreeTable.html?sap-ui-debug=true&sap-ui-language=en-US&sap-ui-theme=sap_bluecrystal&sap-ui-accessibility=true&sap-ui-jqueryversion=1.10.2


Updated on: 17-Dec-2019

366 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements