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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T20:11:40+00:00 2026-06-07T20:11:40+00:00

How do I load a ‘child’ application inside a ‘parent’ application? I have this

  • 0

How do I load a ‘child’ application inside a ‘parent’ application?

I have this main application called the Frame and several child applications. The frame has a border layout. On the left there are some buttons (like a menu) to load other projects. In the center there is the container for my child projects. The frame project has the default mvc structure.

Inside the folder I put a Test application. Also the default structure.

/frame/app/controller
          /view
      /test/app/controller
               /store
               /model
               /view
           /css
           /app.html
           /app.js
      /test2/app/controller
               /store
               /model
               /view
           /css
           /app.html
           /app.js
      /css
      /app.html
      /app.js

something like this.

Now I wanted to load from a button in the frame a child project.

So my function would look something like this:

function(){
   Ext.require('Test.view.testMainContainer', function(){
       var toPutInMyContainer = Ext.create('Test.view.testMainContainer');
       console.log(toPutInMyContainer);
   });
}

With this code are 2 things wrong:

  1. the js is in test/app/view/testMainContainer.js
  2. the function never fires…

What is the best structure an how should I approach this?

What i want to do next is inside the testMainContainer are requires for controllers, models, stores and views and I want to load them automatically when needed.

  • 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-07T20:11:41+00:00Added an answer on June 7, 2026 at 8:11 pm

    There are various strategies to achieve this.

    With respect to the title question, you probably want to have a look at the SubAppDemo by Mitchell Simoens, which demonstrates how to load an sub application within an application.

    A similar, yet different, approach is to dynamically load controller upon request. Here is my code to do (part of the application object):

    loadPage: function(aControllerName)
    {
        var iController = this.dynamicallyLoadController( aControllerName ),
            iPage = iController.view,
            iContentPanel = this.getContentPanel(),
            iPageIndex = Ext.Array.indexOf(iContentPanel.items, iPage);
    
        // If the page was not added to the panel, add it.
        if ( iPageIndex == -1 )
            iContentPanel.add( iPage );
    
        // Select the current active page
        iContentPanel.getLayout().setActiveItem( iPage );
    },
    
    dynamicallyLoadController: function(aControllerName)
    {
        // See if the controller was already loaded
        var iController = this.controllers.get(aControllerName);
    
        // If the controller was never loaded before
        if ( !iController )
        {    
            // Dynamically load the controller
            var iController = this.getController(aControllerName);
    
            // Manually initialise it
            iController.init();
        }
    
        return iController;
    },
    

    When the controller is loaded dynamically, all its models and stores are also loaded dynamically. In my case, I always explicitly create the first view of the controller (which means the view is also dynamically loaded) and inject it into the controller’s view property (controller code):

    init: function()
    {
        this.callParent();
    
        // The dynamically created view is stored as a property
        this.view = this.getView(this.views[0]).create();
    },
    

    With regards to your code, I’m not sure why your function will fire in the first place. But it should work if you put the Ext.require outside any function.

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

Sidebar

Related Questions

I load a swf into a movie clip and have several problems with it:
I load everything on my page. At the end, I have this script. <script
load.js: jQuery(document).ready(function($) { $('.dialog ul li').click(function(e) { switch($(this).attr('id')) { case 'addProject': $('.addDialog').load('/add/addprojectform'); break; case
I load a multiframe TIFF from a Stream in my C# application, and then
I load this JS as a separate file, so it is then available after
I load in a div with class name .preview image's gallery like this: <img
I load some html using AJAX, this works fine, one of the bits that
I load a php/json file. This is my json file: echo '{'; echo 'position:[';
html load coming from NSString. I have the following problem: I get html code
I load a page, saw on twitter, using a line like this: [self.webView loadRequest:[NSURLRequest

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.