Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7431043
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T09:14:03+00:00 2026-05-29T09:14:03+00:00

Hithere, I’m having a strange problem where when I load a tree from a

  • 0

Hithere, I’m having a strange problem where when I load a tree from a json file it goes into a loop and displays the tree as follows (in a continous loop)

-A
  -A
    -A
      -A

My json

{
    "success": true,
    "results": [
        { "text": "number 1", "leaf": true },
        { "text": "number 2", "leaf": true },
        { "text": "number 3", "leaf": true },
        { "text": "number 4", "expanded": true, "children":[
            { "text": "number 4.1", "leaf": true },
            { "text": "number 4.2", "leaf": true },
            { "text": "number 4.3", "leaf": true }
        ]},
        { "text": "number 5", "leaf": true }
    ]
}

My model

Ext.define('App.model.TreeModel', {
    extend:'Ext.data.Model',
    fields: [
             { name: 'text', type: 'string'}
         ],

        proxy:{
            type:'ajax',
            url: 'data/tree.json',
            reader:{
                type:'json',
                root:'results'
            }
        }
    });

Store

Ext.define('App.store.MyTreeStore', {
    extend: 'Ext.data.TreeStore',
    requires: 'App.model.TreeModel',
    model:'App.model.TreeModel',
});

View

Ext.define('App.view.MeetingTree', {
    extend:'Ext.tree.Panel',
    title:'Simple Tree',
    store:'MyTreeStore',
    alias:'widget.meetingtree',
    rootVisible:false,
    height:200
});

My init file

Ext.application({
    name: 'App', 
    autoCreateViewport: true,

    models: ['TreeModel'],    
    stores: ['MyTreeStore'],

    launch: function() {

    }
});

Dont have a clue why its looping.. anyone got an idea?

Thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T09:14:03+00:00Added an answer on May 29, 2026 at 9:14 am

    finally found a solution

    Remove the line

    root:'results'
    

    from the model

    and star the json with

    { 
    text: '.',
    children: [{
    

    full json

    { 
    text: '.',
    children: [{
        text:'Basic Ext Layouts',
        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:'Card (TabPanel)',
            id:'card-tabs',
            leaf:true
        },{
            text:'Card (Wizard)',
            id:'card-wizard',
            leaf:true
        },{
            text:'Column',
            id:'column',
            leaf:true
        },{
            text:'Fit',
            id:'fit',
            leaf:true
        },{
            text:'Table',
            id:'table',
            leaf:true
        },{
            text:'vBox',
            id:'vbox',
            leaf:true
        },{
            text:'hBox',
            id:'hbox',
            leaf:true
        }]
    },{
        text:'Custom Layouts',
        children:[{
            text:'Center',
            id:'center',
            leaf:true
        }]
    },{
        text:'Combination Examples',
        children:[{
            text:'Absolute Layout Form',
            id:'abs-form',
            leaf:true
        },{
            text:'Tabs with Nested Layouts',
            id:'tabs-nested-layouts',
            leaf:true
        }]
    }]
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

HI there! I've run into some problem while learning to combine .sh files and
Hi there I'm use to SQL, but I need to read data from a
Hi there i've built a new script (from scratch not a CMS) and i've
Hi there I am looking to parse an Object I have into a String
Hi there I am looking for a solution to solve this problem.I am building
Hi there I am looking to create a image dynamically from an array[500][500] (500x500pixel)
Hi there guys trying to gather some ideas to tackle this problem. i am
namespace hi { class hithere { public int numberOne = 12; private int numberTwo
namespace hi { class hithere { public int numberOne = 12; public int numberTwo
Hi there is a problem in my login page. The scenario is, For example

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.