Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16

Thread: [CLOSED]Ext 4 - Infinite recursive tree loading if reader is defined

    You found a bug! We've classified it as a bug in our system. We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #11
    Ext JS Premium Member
    Join Date
    Mar 2008
    Location
    Phoenix, AZ
    Posts
    651

    Default

    I retested against Ext 4.0.1. The recursive loading still exists.

  2. #12
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,258

    Default

    The sample code provided by Saki isn't correct.

    The root is set to rows, yet in the child data it uses "children" instead. You need to use the same one throughout.
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

  3. #13
    Ext JS Premium Member
    Join Date
    Mar 2008
    Location
    Phoenix, AZ
    Posts
    651

    Default

    Thank you for looking into this.

    Apparently I'm confused what the definition of "root" is because looking at the Json Reader docs, this means...
    "root : String Required. The name of the property which contains the Array of row objects. ..."

    If you look at the data...
    {
    success:true
    ,rows:[{
    "text": "To Do",
    "cls": "folder",
    "expanded": true,
    "children": [{
    ...

    Does that mean the json response must use the same "children" property for the data in the nested structure and for the children nodes? Is there some documentation that I missed that explains this about preloaded tree data? If not, can that dual-purpose be documented somewhere since I'm sure I'm not the only one that used pre-loaded trees?

    Thank you.

  4. #14
    Ext JS Premium Member
    Join Date
    Mar 2008
    Location
    Phoenix, AZ
    Posts
    651

    Default

    @evant

    Thank you again for the clarification. I switched the tags in the examples and the tree preloaded successfully.

  5. #15
    Sencha User
    Join Date
    Mar 2010
    Posts
    30

    Thumbs up

    Thank's fo your clearify. I was tired to war with such behaviour!
    Let's me repeat the idea of loading trees from packets, with nested tree data:
    Code:
    {
        success: true,
        data : [
            {
                   id: 1,
                   text: 'node1',
                   data : [{
                       id: 3,
                       text: 'child1 of node1'
                   },{
                       id: 4,
                       text: 'child2 of node1'
                   }]
             },{
                   id: 2,
                   text: 'node2'
             }
        ]
    }
    So, the same name for node data rules

  6. #16
    Sencha User
    Join Date
    Nov 2013
    Posts
    2

    Default

    i hate it ....

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Tree recursive search
    By Aldri in forum Community Discussion
    Replies: 6
    Last Post: 26 Feb 2013, 6:54 PM
  2. Gxt Tree Recursive Child Adding Problem
    By arindam_saha in forum Ext GWT: Help & Discussion (1.x)
    Replies: 0
    Last Post: 29 Dec 2008, 8:17 AM
  3. TreePanel goes on an infinite loading when leaf is set to false
    By arieldmorales in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 11 Aug 2008, 2:29 PM
  4. [SOLVED] Grid doesn't sort when reader defined with record
    By kgmoney in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 11 Apr 2008, 5:30 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •