cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

How can I make the Tree widget lazy load?

brsmith
7-Bedrock

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

2 REPLIES 2
AdamR
14-Alexandrite
(To:brsmith)

Brad,

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).

brsmith
7-Bedrock
(To:AdamR)

That sounds great Adam, many thanks. We will have some Java under the hood so this sounds possible.

Announcements


Top Tags