Hybrid View

  1. #1
    Sencha User
    Join Date
    Feb 2012
    Location
    Davenport, IA
    Posts
    30
    Answers
    2
    Vote Rating
    6
    WillFM is on a distinguished road

      0  

    Default Answered: TreePanel/AbstractStore.Sync() new record Hierarchy issues (ExtJS 4.1.0-rc3)

    Answered: TreePanel/AbstractStore.Sync() new record Hierarchy issues (ExtJS 4.1.0-rc3)


    I might just be approaching it the wrong way. But I feel, that the AbstractStore sync issue is greatly flawed in the order in which it submit each new node to the server on a create call.

    An example would be I created several new records in a treestore.

    -record A //1
    --subRecord 1 //2
    -record B //3
    --subRecord 2 //5
    -record C //4
    --subRecord 3 //6

    The //#, indicates the order in which each item was created in the treepanel before being synced.

    Here is what is passed to the server on the create pass of the sync:

    PHP Code:
    {    "Data": [{
            
    "id""",
            
    "text""record A",
            
    "clientId""ext-record-1",
          
    "parentId""IDFromServer1"
        
    }, {
            
    "id""",
            
    "text""subRecord 1",
            
    "clientId""ext-record-2",
            
    "parentId"""
        
    }, {
            
    "id""",
            
    "text""record B",
            
    "clientId""ext-record-3",
            
    "parentId""IDFromServer1"
        
    }, {
            
    "id""",
            
    "text""record C",
            
    "clientId""ext-record-4",
            
    "parentId""IDFromServer1"
        
    }, {
            
    "id""",
            
    "text""subRecord 2",
            
    "clientId""ext-record-5",
            
    "parentId"""
        
    }, {
            
    "id""",
            
    "text""subRecord 3",
            
    "clientId""ext-record-6",
            
    "parentId"""
        
    }]

    should there not be at least like a clientParentID parameter , being passed to help identify the record associations? else, shouldn't they submit in an order which indicates hierarchy?

    What am I missing? I've been avoiding using newer versions of Ext because of a bug in version's passed this with a few events that were broken in later versions that my application was dependent on. but if there is a few or better way to do this in newer releases i may re-evaluate newer versions.

  2. I've got a work around working for the time being. on the ItemAppend event for the treepanel, I'm appending the parents internalId, to the new node as a new data value called clientParentId. which is then sent to the server.
    This allows it to keep track of the new nodes, and append Id's to them properly to keep my Hierarchy intact

  3. #2
    Sencha User
    Join Date
    Feb 2012
    Location
    Davenport, IA
    Posts
    30
    Answers
    2
    Vote Rating
    6
    WillFM is on a distinguished road

      0  

    Default


    I've had little luck solving this issue, any input would be appreciated.

  4. #3

  5. #4
    Sencha User
    Join Date
    Feb 2012
    Location
    Davenport, IA
    Posts
    30
    Answers
    2
    Vote Rating
    6
    WillFM is on a distinguished road

      0  

    Default


    I've got a work around working for the time being. on the ItemAppend event for the treepanel, I'm appending the parents internalId, to the new node as a new data value called clientParentId. which is then sent to the server.
    This allows it to keep track of the new nodes, and append Id's to them properly to keep my Hierarchy intact

Thread Participants: 1

Tags for this Thread

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..." hd porno faketaxi