1. #1
    Ext User
    Join Date
    Apr 2008
    Posts
    63
    Vote Rating
    0
    cdasher is on a distinguished road

      0  

    Default How to update model in Asynchronous Tree

    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

  2. #2
    Ext User
    Join Date
    Apr 2008
    Posts
    63
    Vote Rating
    0
    cdasher is on a distinguished road

      0  

    Default


    So I add a new item to my database and then call

    viewer.refresh(tree.getSelectionModel());
    viewer.update(tree.getSelectionModel());

    and the FIRST time, it adds refreshes the tree with my new item , subsequent calls to the same do nothing...... any ideas?

  3. #3
    Sencha - GXT Dev Team darrellmeyer's Avatar
    Join Date
    May 2007
    Location
    Washington, DC
    Posts
    2,242
    Vote Rating
    2
    darrellmeyer is on a distinguished road

      0  

    Default


    You should call refresh with the element who's children you want reloaded. You do not want to pass the selection model to refresh.

  4. #4
    Ext User
    Join Date
    Apr 2008
    Posts
    63
    Vote Rating
    0
    cdasher is on a distinguished road

      0  

    Default


    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.

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..."