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

  • Home
  • SEARCH
  • 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 8392071
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T19:25:32+00:00 2026-06-09T19:25:32+00:00

I am trying to dynamically build a form based on data returned from the

  • 0

I am trying to dynamically build a form based on data returned from the server. In this instance, I do not have my store in the <PROJECT NAME>/store folder. I have it in <PROJECT NAME>/store/admin. It is defined like this:

Ext.define('APP.store.admin.TaskOption', {
extend: 'Ext.data.Store',
autoLoad: false,
storeId: 'adminTasksOptions',
model: 'APP.model.admin.TaskOption',
sorters: [
    { property: 'order', direction: 'ASC' }
]
});

Please notice the storeId.

Now in my controller, I tried this in the init method, but it did not work (ie: it did not call the taskOptionsLoaded method.

      Ext.create('APP.store.admin.TaskOption');

      this.getAdminTasksOptionStore().on({
          scope: this,
          load : this.taskOptionsLoaded
      });

Also note, that when I did a break point and checked, this.getAdminTaskOptionStore returned the correct store. I am guessing that is happening because I am putting the store in a sub folder? Not sure, but instead of reorganizing folder structure and putting them all in the store folder (I have a ton of stores; large project), I am trying to find a solution so I can keep files organized so it is easy for the next guy.

So now I have tried this, and this doesn’t work either. This is being executed in a method in the same controller.

Ext.getStore('adminTasksOptions').load(
        {'params' : {'t_id' : this.selectedTaskTemplate},
        callback: function(store, records, success) {
            this.taskOptionsLoaded(store, records, success);
        }
    },this);

When I breakpoint on the this.taskOptionsLoaded line, it is within the store scope, not the controller (this) scope.

What is the cleanest way to add a load callback in a store with it’s own storeId, and execute a method within the scope of the controller?

Hope that makes sense.

  • 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-09T19:25:33+00:00Added an answer on June 9, 2026 at 7:25 pm

    If your controller had a config stores: ['AdminTasksOptionStore'], it would generate a getter called getAdminTasksOptionStore().

    The fact your storeId is adminTasksOptions doesn’t mean ExtJS will generate getters in a controller; you can, however, do Ext.data.StoreManager.lookup('adminTasksOptions').

    You’d need to have in your controller:

    stores: ['TaskOption'],
    

    And then in your controller you’ll have the getter getTaskOptionStore().

    With regards to your load scope, you are using wrong variables, it should really be:

    Ext.getStore('adminTasksOptions').load({
        scope: this,
        params: {'t_id' : this.selectedTaskTemplate},
        callback: function(store, records, success) {
            this.taskOptionsLoaded(store, records, success);
        }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using PyClips, I'm trying to build rules in Clips that dynamically retrieve data from
I'm trying to build a form dynamically based on the field and its definitions
I have a javascript question. I'm trying to dynamically build a plugins string variable
I'm trying to build an associative array in PHP dynamically, and not quite getting
I'm trying to dynamically create a navbar from data i fetch from a web
So I'm trying to dynamically build a table in javascript and I already have
I'm trying to dynamically build up expressions based on a Specification object. I've created
So i am trying to build and prepare using PDO, a mysql query dynamically.
Project A contains a WPF Window (Data Entry Form) with a stack panel of
I have an ASP.NET web form. This web form has an event handler that

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.