How to update model in Asynchronous Tree
So, I have a TreeViewer which is loading my tree from the server and I have a form that adds a new object into the database, how do I notify the tree to get the latest info and refresh itself. Also, I would like to just update one node and I see the refresh methods and the find method on the viewer. What is the best way to accomplish this . If viewer.refresh(elem) is the right way, how do I get elem when I am on some other form, do I register the tree and then ask it for the selected item?
Last edited by cdasher; 24 Apr 2008 at 10:51 AM.
Reason: adding more information
So I add a new item to my database and then call
and the FIRST time, it adds refreshes the tree with my new item , subsequent calls to the same do nothing...... any ideas?
Sencha - GXT Dev Team
You should call refresh with the element who's children you want reloaded. You do not want to pass the selection model to refresh.
actually I tried that and it worked the same way, What I have found out which I (edit: thought I had but actually posted in the same help forum sorry) posted under bugs is that the FIRST time I add to the tree and expand it works. After that (once the tree is expanded) any other calls to refresh do nothing, even if I refresh and load eveything anew, I cannot get the refresh to work. By the way I am very impressed by the quick response time and I have already put in for a devleoper license and silver support. So thanks for helping in the Free forum.