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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T16:11:01+00:00 2026-05-21T16:11:01+00:00

I just downloaded the final version of ExtJs 4 and I’m trying to implement

  • 0

I just downloaded the final version of ExtJs 4 and I’m trying to implement some things using new Model approach.

For instance I have a model named SetupModel, it has 2 nested models Users, Reports.
I create new store and I set the Model property of the store = SetupModel.

The question is – how can I access my nested properties after data was loaded into the store?

I need something like myStore.data.Users(), but is incorrect.

Any thoughts?

  • 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-21T16:11:02+00:00Added an answer on May 21, 2026 at 4:11 pm

    When you define your model, you need to provide the necessary association with the nested models. Since, you have not provided your code. Here is an example:

    My Product Model:

    Product = Ext.define('Product',{
        extend: 'Ext.data.Model',
        fields: [
            {name: 'id', type: 'int'},
            {name: 'user_id', type: 'int'},
            {name: 'name', type: 'string'},
            {name: 'price', type: 'float'}
        ],
        proxy: {
            type: 'localstorage',
            id: 'products'
        }
    });
    

    My User Model:

    User = Ext.define('User',{
        extend: 'Ext.data.Model',
        fields: [
            {name: 'id',       type: 'int'},
            {name: 'name',     type: 'string'},
            {name: 'gender',   type: 'string'},
            {name: 'username', type: 'string'}
        ],
        associations: [
            {type: 'hasMany', model: 'Product', name: 'products'}
        ],
        proxy: {
            type: 'localstorage',
            id  : 'users'
        }
    });
    

    Now, if you have a instance of User model with products. Here is how you can access the products:

    var productStore = user.products();
    

    Note that user.products() returns a Ext.data.Store. Now, you can traverse or filter or find your product record. Here is how I got my first product’s name:

    productStore.getAt(0).get('name');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just downloaded new release of Hibernate 4.0.1 final release. It is very strange
I just downloaded and ran the boost installer for version 1.42 (from boostpro.com), and
I just downloaded the release version of MVC 2, pretty excited about that! Problem
I just downloaded Netty for a personal client-server-project from here: http://netty.io/downloads/netty-3.3.0.Final-dist.tar.bz2 On the download
I am trying to download Xcode from the Apple Developer site using just wget
I just downloaded a trial version of NDepend. What I'm looking for is a
Just downloaded Quartz.Net, read the documentation which is out of date and have ended
Just downloaded the Visual Studio 2010 Premium and realized that can't compile the project,
I just downloaded the Oxygene free command line compiler, and tried to read the
I just downloaded the WPF Reports v0.4 alpha When I build the project in

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.