Update/reload a selected node, possible?
Asked Answered
E

1

10

Iv been working on a project with fancytree as a tree-view. works grate with Ajax and server calls. How ever. I still wonder if its possible to reload a selected node to get updated regarding its children? Iv seen and tried theReload() function. But it seems it only reloads the either tree-structure and that would not be necessary.

Otherwise, do you know of any other tree-view that supports this kind of node-reload?

Eightfold answered 18/3, 2014 at 22:11 Comment(0)
S
13

There is also node.load(forceReload=false) and node.resetLazy().

See here for an overview: http://www.wwwendt.de/tech/fancytree/doc/jsdoc/FancytreeNode.html

Sacrament answered 20/3, 2014 at 19:14 Comment(3)
Works grate. Is there a way to even improve this like a recursive node update? Would be grate of it would be possible to keep the tree in "almost" the state its in and only update changes like renames, deletes and adds? This to avoid expanded sub-nodes to be closed agin.Eightfold
We have tree.applyPatch(), but that's not fully imple,ented yet. The recommended way is currently to reload the tree and use the persist extensionSacrament
Is there an example: how to use?Byblow

© 2022 - 2024 — McMap. All rights reserved.