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

The Archive Base Latest Questions

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

I’m using Sencha touch 2. I have store that load from existing js object:

  • 0

I’m using Sencha touch 2. I have store that load from existing js object:

Ext.define('majestic.store.Dataset', {
    extend : 'Ext.data.Store',

    requires : [
        'majestic.model.Dataset',
        'majestic.util.config.ConfigurationManager'
    ],
    config : {
        model   : 'majestic.model.Dataset',
        type: 'memory',
        reader: 'json',
        autoLoad : true,
        proxy: {
            type: 'memory',
            reader: {
                type: 'json',
                rootProperty : 'datasets'
            }
        }

    },
    constructor: function(config) {
        this.callParent(arguments);
        this.applyData(majestic.util.config.ConfigurationManager.getConfig());
    }

});

Model:

Ext.define('majestic.model.Dataset', {
    extend : 'Ext.data.Model',

    config : {
        fields : [
            'title'
        ],

        associations: [
              {type: 'hasMany', model: 'Layer', name: 'layers'}
        ]

    }
});

And view:

Ext.define('majestic.view.LayerList', {
    requires: ['majestic.store.Dataset'],
    extend: 'Ext.dataview.List',
    config:{
        store: 'Dataset',
        itemTpl: '<div>{id} is {title}</div>',
        itemSelector: "div"
    }
});

After looking at Data view in Sencha touch i’ve added autoLoad and itemSelector, still no luck.

Though running

new majestic.store.Dataset().each(function(i) {console.log(i)}); 

outputs list of objects with filled data attributes.

UPDATE

I agree with @fbrandel that first option is how it should work, but after reading ST source i’ve figured out that store parameter of dataview is interpreted as:

  • store object
  • json store notation like in first example here
  • name of already created store which can be resolved using StoreManager.lookup

So I ended up with:

  1. Leaving store:'Dataset' in View
  2. Adding storeId : "Dataset" to store, so it can be resolved by StoreManager
  3. Adding stores: ['Dataset'] which caused creation of majestic.store.Dataset and registering it in StoreManager

P.S. It also could be done using this.setStore(new majestic.store.Dataset()) in initialization method of GridView, but I prefer declarative way where posible

  • 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:44:12+00:00Added an answer on May 29, 2026 at 9:44 am

    Here are some suggestions:

    1. Try to set the store to ‘majestic.store.Dataset’ instead of just Dataset
    2. Add the store dependency to your app.js like this:

      Ext.application({
          name: 'majestic',
          stores: ['Dataset'],
      
          launch: function() {   
             ...
          }
      });
      
    3. Instead of passing a string to the store property, pass an instance:

      store: Ext.create('majestic.store.Dataset')
      

    Option #1 seems to be the most obvious way how it should work. If it does not, this might be a bug in ST2.

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

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a text area in my form which accepts all possible characters from
I have thousands of HTML files to process using Groovy/Java and I need to
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a bunch of posts stored in text files formatted in yaml/textile (from
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and

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.