Question

I have requirement where some times I would like to load children as well as grand children and if possible their children in lazy loading..Is it possible?

When I am preparing json response for lazy loading can I prepare json response like this?

[ { "title": "Node1", "isLazy": true, "key": "BC13B21636CD6D5C", }, { … }, … ]

to solve my problem can I try like this ?

 [ { "title": "Node1", "isLazy": true, "key": "BC13B21636CD6D5C",children:{ "title": "childNode", "isLazy": true, "key": "asdaasas"} }, { … }, … ]

will this work ?

Actually requirement is when the page loads depending one some condition a particular node down the tree should be expanded and activated, shown to the user.Also lazy loading of other nodes can take place if user wants as normal.

Was it helpful?

Solution

Yes, that should work: You can pass nested structures. Note that if a node has children defined, the "isLazy": true flag is not required (but does not hurt either).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top