I want to programmatically do to the tree what happens when I pick "reload" in the context menu.
I have tried to use the reloadActionNode() method from the API and it triggers two calls to the data service, whereas the context menu only triggers one, and is much faster. I am tracing through the javascript code, but can anyone tell me: how do I trigger the reload?
In addition I want the node to be selected again, so that whatever happens when a node is selected, happens. reloadActionNode() does not trigger the select event... Again, I have tried to trace through the javascript code, but...
var tree = $('.umbTree'); var api = tree.UmbracoTreeAPI(); var node = tree.find('.clicked').parent(); api._loadChildNodes(node, null); api.selectNode(node, false, true);
Umbraco Tree javascript API
OK, this is driving me mad.
I want to programmatically do to the tree what happens when I pick "reload" in the context menu.
I have tried to use the reloadActionNode() method from the API and it triggers two calls to the data service, whereas the context menu only triggers one, and is much faster. I am tracing through the javascript code, but can anyone tell me: how do I trigger the reload?
In addition I want the node to be selected again, so that whatever happens when a node is selected, happens. reloadActionNode() does not trigger the select event... Again, I have tried to trace through the javascript code, but...
Can anyone help?
At the moment I'm with this:
Anyone has a better idea?
Hi,
You can try using the SyncTree method - see this thread for both C# and Javascript examples.
-Tom
Thanks Tom. There seem to be many ways to do one thing :-)
is working on a reply...