1. #1
    Ext User
    Join Date
    Feb 2009
    Posts
    60
    Vote Rating
    0
    erincarikan is on a distinguished road

      0  

    Default Adding a model to TreeStore results in duplicate nodes

    Adding a model to TreeStore results in duplicate nodes


    I am trying to change the structure of my reordering tree based on a selection event from another table. I tried a lot of things and nothing seemed to work. My final approach is as follows: I keep a reference to reordering tree's treestore and its root item's model. They are respectively named as store and dragRoot.

    Here's the code that I use to add a node to the tree. When it's executed, it creates two nodes under the root of the tree. I can't seem to understand what is wrong with this.
    Code:
     
    
    MediasetModel md = new MediasetModel("am",1);
    store.add(dragRoot, md, false); store.update(dragRoot);
    Can somebody please help me, I struggled about this problem at least for 2 days, and it looks like it's one of the most basic functionality of a tree, It isn't supposed to be this hard. Nobody seems to be able to help.

  2. #2
    Ext User
    Join Date
    Feb 2009
    Posts
    60
    Vote Rating
    0
    erincarikan is on a distinguished road

      0  

    Default


    I realized this only happens when the store update takes place because of a async call back, if I take it outside of async call back function, it updates the store correctly. I keep counters to check if async function is called once. And it looks like it's being called once. I need to make the update in async call back, I get the data from database, please help!

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar