Topic: Loadable nodes
Hi moro,
I need help with the following setup.
Tree nodes have onSelect event handler that: a) prompts user for new subnode title; b) sends AJAX call to server, which adds node to the database and reports back JSON structure for the newly created node.
Can I inject that new node "live" into the visual tree structure?
There can be two cases:
1) Parent node did not have any children, so after injecting new node it should:
a) change its "gadget" to + sign (expandable node)
b) display its child that was just created
2) Parent node had other children, so new child is injected somewhere next to other siblings.
Now, the problem is that I cannot make node.load() load just one new child.
Do you have an example of how this can be done?
Thanks