I have created a tree navigation menu using Dynatree (http://wwwendt.de/tech/dynatree/index.html). The tree has four levels: company, group, user and computer. Every object in the tree is selectable (seleting the object opens a page showing the properties of that object), and each object can have children except for the level 4 objects ("computer").
Now I have tried to make the tree lazy-loaded according to the instructions in the documentation: http://wwwendt.de/tech/dynatree/doc/dynatree-doc.html#lazyLoading The first-level content loaded from the background has the isLazy option set to true and I have added the onLazyRead callback to the tree.
What I need from the tree: the first level is always loaded but expanding the first level object with the [+] character expands the first level object and loads the underlying objects (group, user, computer) in the background. Loading the tree works in the sense that I can see the first level elements, but the problem is that
This seems like a catch-22, as there seems to be no option to make a node expandable without it having children, making it impossible to make the tree lazy-loading. What am I missing?
If your server delivers nodes that are to be lazy loaded, you must set the node.isLazy
attribute to true
.