How is it possible to reload the nodes in the tree after a node is saved? I know that it should bed possible if i use a event, so i looked at the event AfterSave, but i can't see how to reload the nodes from there.
I think this is something that will be fixed in the next version of Umbraco ( v 4.1 ) as the tree has been completely replaced, as I believe it is soon to be released you might want to wait for this.
As Chris mentioned this problem had been fixed, and it is fixed in the recent 4.5 release.
I recommend upgrading to that for a multitude of reasons, not just the improved tree.
The reason for the bug was an inherit problem in xtree which use to power Umbraco. If there wasn't a child node before you created your new node then it would not refresh properly as it internally believed there to be no children, even once you created one.
jsTree which powers Umbraco now does not have this problem and it just damn sexy!
At the time I didn't get it to work properly and didn't want to spend too much time on it, so I just left it as a caveat that the user has to be aware of i.e. they have to reload to view the node after saving it...
I've been playing about with v4.5 and am liking what I've seen so far...
How to "reload nodes" after saving node
How is it possible to reload the nodes in the tree after a node is saved? I know that it should bed possible if i use a event, so i looked at the event AfterSave, but i can't see how to reload the nodes from there.
Is there anyone that can help?
Thanks in advance!
Hi,
I think this is something that will be fixed in the next version of Umbraco ( v 4.1 ) as the tree has been completely replaced, as I believe it is soon to be released you might want to wait for this.
Best regards,
Chris
Hi there
After struggling a lot with this, I found this way to reload a node from C#:
Cheers,
Mathias
Hi Mathias,
could you tell me where this code should be added?
In the Document_AfterSave Event?
Thanks,
Pat
Hi Pat,
Yes, I used it in an AfterSave Event, but it works very unstable. A workaround is to hardcode the nodeKey and use this code:
where XX is the nodeKey of the object you want to reload.
Let me know if you make any improvements.
Thanks,
Mathias
As Chris mentioned this problem had been fixed, and it is fixed in the recent 4.5 release.
I recommend upgrading to that for a multitude of reasons, not just the improved tree.
The reason for the bug was an inherit problem in xtree which use to power Umbraco. If there wasn't a child node before you created your new node then it would not refresh properly as it internally believed there to be no children, even once you created one.
jsTree which powers Umbraco now does not have this problem and it just damn sexy!
Thanks guys I've been away from the forum.
At the time I didn't get it to work properly and didn't want to spend too much time on it, so I just left it as a caveat that the user has to be aware of i.e. they have to reload to view the node after saving it...
I've been playing about with v4.5 and am liking what I've seen so far...
is working on a reply...