Implementing tree structure in Sapui5 and restricting parent property

SAPSAP UISSAP APO

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


raja
Published on 18-Dec-2017 05:04:09
Advertisements