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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T06:55:23+00:00 2026-06-07T06:55:23+00:00

I have a TreeStore, which works fine, but every node has some nested data,

  • 0

I have a TreeStore, which works fine, but every node has some nested data, so I made a new model for it and used the hasMany association. But now the store loads nothing anymore. When I look into the records in the load event, they’re empty, but the browser tells me the Ajax request delivered everything like before.

This is what the node data looks like, when it comes from the server:

{
  "path": "KEY_518693",
  "name": "KEY_518693",
  "data": [
    {
      "branch": "KEY_518693",
      "primnav": "ETC",
      "X": 29261,
      "Y": 96492
    },
    ...
  ],
  "children": [ ... ],
  ...
}

These are my model definitions:

TreeNode:
{
  extend  : 'Ext.data.Model',
  requires: [
    'DataRecord',
    'Ext.data.association.HasMany'
  ],
  fields  : [
    { name: 'id'  , type: 'string', mapping: 'path' },
    { name: 'text', type: 'string', mapping: 'name' },
    ...
  ],
  hasMany : {
    model: 'DataRecord',
    name : 'data'
  }
DataRecord:
{
  extend: 'Ext.data.Model',
  fields: [
    { name: 'branch' , type: 'string'},
    { name: 'primnav', type: 'string' },
    { name: 'X'      , type: 'int' },
    { name: 'Y'      , type: 'int' }
  ]
}

When I remove the association, the tree loads without problems. When I add data to the fields it gets parsed into the tree, but as “raw” object and not as model instance.

  • 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-06-07T06:55:25+00:00Added an answer on June 7, 2026 at 6:55 am

    Please note that DataRecord has no field called treenode_id – so your hasMany association isn’t complete. See docs for more info.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a nested list which must be filled with new data based on
I have GUI application with gtk.Treeview component. It's model is set to gtk.Treestore, which
have written this little class, which generates a UUID every time an object of
Have converted devise new session from erb to Haml but doens't work, this is
I have some stock market data. I want to simulate the stock market by
I am trying to load data into an extjs 4 TreeStore but while appending
I have a dojo.data.ItemFileWriteStore object with items which contain a 'children' attribute, which in
I have ultraTree (infragistics tree) which is created at design time and it has
Can I load some static data to Ext.data.TreeStore instance? It is pretty straightforward for
I have standard TreePanel with TreeStore binded. I create simple dialog to add new

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.