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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T02:48:59+00:00 2026-06-13T02:48:59+00:00

I have modular application that contains several modules/plugins, that can also run as standalone

  • 0

I have modular application that contains several modules/plugins, that can also run as standalone applications.

I dynamically register module/plugin controllers to main application and here is the problem in steps.

  • My main app has A prefix – its controller” A.controller.AppController.
  • My plugin has B prefix – its controller: B.controller.PortalController

Code of plugin controller:

 Ext.define('B.controller.PortalController', {
     extend: 'Ext.app.Controller',
     views: [
         'portal.MapPanel',
         'administration.ConfigPanel',
         'administration.ConfigPanelWrapper'
     ],
     //stores:['Test'],
     init: function() {
         console.log('portal controller init');
         //console.log(this.getTestStore());
         this.control({

         });
     }
 });

The views register properly with B prefix, Ext.Loader loads B.view.portal.MapPanel but the store is not loaded.

If I specify stores:['Test'] it tries to load A.store.Test, If I specify test.Test it does nothing (like error but ext-all-debug does not catch it) and if I specify stores:['B.store.Test'] it loads it properly but now I have to use getBStoreTestStore() to get the store reference that will cause a lot of code changing.

How to make the controller to load stores with proper prefix?

  • 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-13T02:49:00+00:00Added an answer on June 13, 2026 at 2:49 am

    Without override I think it is impossible. What is more for my views it should not work also!

    All code from ext-all-debug.js

    Controller loads classess properly using proper prefix using its own classname:

    namespace = Ext.Loader.getPrefix(className) || match[1];
    namespaceAndModule = namespace + '.' + module + '.'
    

    But For each view, store, model its controller creates getter passing name into getStore, getView, getModel function

    if (!this[fn]) {
        this[fn] = Ext.Function.pass(this['get' + type], [ref], this);
    }
    

    The getStore function that getter is passed into returns application store:

    getStore: function(name) {
        return this.application.getStore(name);
    },
    

    Application itself uses getModuleClassName to resolve class name

    getModuleClassName: function(name, module) {
    
        if (name.indexOf('.') !== -1 && (Ext.ClassManager.isCreated(name) || Ext.Loader.isAClassNameWithAKnownPrefix(name))) {
            return name;
        } else {
            return this.name + '.' + module + '.' + name;
        }
    }
    

    So if there is fully qualified class name with known prefix it will return name only otherwise class name will be built using this.name which is application name so using stores:['Test'] will point to A.store.Test.

    I am thinking about writing an override but I am afraid that it will break other things.

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

Sidebar

Related Questions

My application implements a modular architecture that can dynamically load one or more plugin
I'm writing a modular application that will dynamically import modules at runtime based upon
If you have a modular applicaiton that depends on its modules to be in
I have created a modular application. I have two modules, for example Module1 and
We have a modular application where modules have their own log4j logs (i.e. communication
I am have modular structure in my project --application ----modules -----admin ------models -----client ------models
I'm working with a MVC modular structure, kind of like you can have with
I am creating a modular ASP.NET MVC application using areas. In short, I have
I'm writing a Java application that will have an on-screen number pad available for
I have a PHP MySQL application which has a modular design. There are about

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.