1. #1
    Sencha User
    Join Date
    Oct 2010
    Posts
    51
    Vote Rating
    0
    Tomeo is on a distinguished road

      0  

    Default Problem with tree - infinite tree node loop

    Problem with tree - infinite tree node loop


    Hello,

    my tree data is defined within JSON file:
    navigationTree.json
    Code:
    {
        'success': true,    
        'results': [{
                    text:'Main node 1',
                    expanded: true,
                    children:[{
                                  text:'Absolute',
                                  id:'absolute',
                                  leaf:true
                              },{
                                  text:'Accordion',
                                  id:'accordion',
                                  leaf:true
                              },{
                                  text:'Anchor',
                                  id:'anchor',
                                  leaf:true
                              },{
                                  text:'Border',
                                  id:'border',
                                  leaf:true
                              }]
                    },{
                    text:'Main node 2',
                    children:[{
                                  text:'Aaaaa',
                                  id:'center',
                                  leaf:true
                              }]
                    },{
                    text:'Main node 3',
                    children:[{
                                  text:'Absolute Layout Form',
                                  id:'abs-form',
                                  leaf:true
                              },{
                                  text:'Tabs with Nested Layouts',
                                  id:'tabs-nested-layouts',
                                  leaf:true
                              }]
                    }
                  ]
    }
    Store is defined as
    NavigationTrees.js
    Code:
    /*
    Ext.define('Doprava.store.NavigationTrees', {
        extend: 'Ext.data.TreeStore',
        storeId: 'navigationTreeStore',
        requires: 'Doprava.model.NavigationTree',
        model: 'Doprava.model.NavigationTree'
    });
    
    */
    Ext.define('Doprava.store.NavigationTrees', {
        extend: 'Ext.data.TreeStore',
        autoLoad:true,
        //model:'NavigationTree',
        proxy: {
            type: 'ajax',
                url: 'data/navigationTree.json',
                reader: {
                    type: 'json',
                    root: 'results'
                }
        }
    });
    Navigation View panel
    Code:
    Ext.define('Doprava.view.NavigationTreePanel', {
        extend: 'Ext.tree.Panel',
        alias: 'widget.navigationTreePanel',
        height: 250,
        width: 400,
        title: 'Tree',
        height: 210,
        width: 352,
        layout:'fit',
        store: 'NavigationTrees',
        root: {},
        rootVisible: false 
    });
    When I run above code, I get infinite tree loop, please see attached picture.

    tree-loop.jpg

    Any idea what can cause it?

    Thanks,
    Tomas

  2. #2
    Sencha User
    Join Date
    Jun 2012
    Posts
    2
    Vote Rating
    0
    langwan is on a distinguished road

      0  

    Default The same.

    The same.


    The same.

  3. #3
    Sencha User
    Join Date
    Jun 2012
    Posts
    2
    Vote Rating
    0
    langwan is on a distinguished road

      0  

    Default


    replace all children to results

    like this:


    success:true,
    results:
    ....
    results:
    ....

    or

    success:true,
    children:
    ....
    children:
    ....

  4. #4
    Sencha User
    Join Date
    Feb 2008
    Location
    Turin, Italy
    Posts
    13
    Vote Rating
    0
    c.barca is on a distinguished road

      0  

    Default Thanks, it work perfectly. Grazie.

    Thanks, it work perfectly. Grazie.



Thread Participants: 2

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