2 Replies Latest reply on Jan 19, 2018 9:18 AM by brsmith RSS
    brsmith Explorer

    How can I make the Tree widget lazy load?

    I want to use the tree widget to drill down into the structure of a model that I have but I don't want to pre-populate the nested infotables as this will take too long. Is there a way to allow the tree widget to lazy load the contents as the tree nodes are expanded?


    Thanks - Brad

      • Re: How can I make the Tree widget lazy load?
        adamr Creator



        This would require either customization of the tree widget or manipulation of the data in the tree via a service.  The true way to make it lazy load would be a widget modification but you can also achieve it by building the tree data structure as you select the nodes in the tree.  You can initially just return the top one or two levels of the tree from you service.  You can then use the selected rows changed event from that service to go back and load more of the tree data when a new node is clicked.


        This would require some logic in the service to determine what was already loaded in your data structure and what needed to be added.


        Hint: you will need to use a session parameter to hold the tree structure and update that value from your service (session parameters are accessible from both the mashup and platform services).