Skip to Content

lazy loading of tree table nodes using OData hierarchy annotations

Hi,

I am new to sapui5.i have created a tree table with expanded nodes.but requirement is children would be lazily loaded when the parent node expanded for the first time using OData hierarchy annotations

Can anyone help me.

Thanks,

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Oct 23, 2015 at 03:19 PM

    Hey Rizwan

    I tried out both JsDoc Report - SAP UI development Toolkit for HTML5 - API Reference - sap.ui.table.TreeTable (TreeA from now on) and JsDoc Report - SAP UI development Toolkit for HTML5 - API Reference - sap.ui.commons.Tree (TreeB from now on). The way I implemented the trees, treeA had lazy loading building by default, TreeB did not.

    With a lot of data however, TreeA was pretty horrible. Each time you would click a folder to open and with each scroll the entire tree would rerender. It was slow and irritating.

    TreeB is much better and easier to style with CSS aswell. You'll have to implement the lazy loading yourself though, but its not difficult. You bind with the data that should appear in the root and don't set any navigation properties (Thus don't code anything about the children yet). Then on folder click you manually set the folder as expanded and bind that nodes' nodes to its children. The following error will appear in your console, but its nothing to worry about: Neither navigation paths parameters, nor (complete/valid) tree hierarchy annotations where provided to the TreeBinding. -

    If you need to know anything else about this, let me know.

    Greetings

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 23, 2015 at 02:19 PM
    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.