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 6007847
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T01:44:27+00:00 2026-05-23T01:44:27+00:00

I am migrating my ExtJs3 application to ExtJs4. In ExtJs3 I had a tree

  • 0

I am migrating my ExtJs3 application to ExtJs4.
In ExtJs3 I had a tree grid which had a loader to load the tree data, like below:

loader: new Ext.tree.TreeLoader({ 
            dataUrl: 'Department/DepartmentTree', 
            nestedRoot: 'Data.items'
    })

So I am trying to create a treeStore in ExtJs4 like below:

   var store = Ext.create('Ext.data.TreeStore', {
        model: 'DepartmentTreeModel',
        folderSort: true,
        proxy: {
            type: 'ajax',
            url: 'Department/DepartmentTree',
            reader: {
                type: 'json',
                root: 'Data.items'
            }
        }
    });

I get an error when I call the load function on the above store Cannot read property 'items' of undefined.

The JSON response looks like this:

    {
"Data":{
    "__type":"ListWrapperOfDepartmentTreeNodewnEzJCii:#PortalMvc.Global.Classlibrary.Model.Ui.JSONWrappers",
    "items":[{
        "ActualHeadcount":0,
        "Headcount":0,
        "Leavers":0,
        "ParentId":"~~",
        "Starters":0,
        "children":[{
            "ActualHeadcount":0,
            "Headcount":0,
            "Leavers":0,
            "ParentId":"!#",
            "Starters":0,
            "children":[{
                "ActualHeadcount":0,
                "Headcount":0,
                "Leavers":0,
                "ParentId":"*w",
                "Starters":0,
                "children":[{
                    "ActualHeadcount":0,
                    "Headcount":0,
                    "Leavers":0,
                    "ParentId":"*z",
                    "Starters":0,
                    "children":[],
                    "iconCls":"admin_button",
                    "id":"*{",
                    "leaf":true,
                    "text":"Parking1_subtree1"
                }]
            }]
        }]
    }]
  }
}
  • 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-23T01:44:27+00:00Added an answer on May 23, 2026 at 1:44 am

    It expects the root to be repeated for each set of child nodes. So for “children” it’s also trying to read “Data.items”.

    If you can’t alter the data structure, the root can also be a function, something like:

    root: function(o) {
        if (o.Data) {
            return o.Data.items;
        } else {
            return o.children;
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Migrating from Subversion to Git using svn2git (which internally uses git-svn) I'd like to
I'm migrating data from an old laptop to a new laptop, including some vb.net
Background: Migrating an application from ball of mud to MVC. Many classes contain HTML
I am migrating a struts application from Websphere to Tomcat 6 and my application
I am migrating web apps to new hosting servers, but when I try to
We are migrating our test report data (unit, regression, integration, etc..) from an XML
I am migrating an application from .NET 1.1 to .NET 2.0. Should I remove
Migrating Data from MySQL server1 to MySQL server2 server1 Ver 14.12 Distrib 5.0.51a, for
We will soon be migrating company data from our pre-production server to production with
Migrating (rewriting) a whole portal originally made in .net to shareopoint doesn't seem like

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.