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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T04:47:42+00:00 2026-06-06T04:47:42+00:00

I have an MVC architecture, but when I try to make another TabPanel insite

  • 0

I have an MVC architecture, but when I try to make another TabPanel insite an existing one, I get this in the browser:

el is null

el = el.dom || Ext.getDom(el); ext-all-debug.js (line 12807)

From what I understand, it seems that the new TabPanel can’t find the needed div for it to render. Anyway, here is the controller:

Ext.define('FI.controller.MainController', {
extend: 'Ext.app.Controller',
id: 'mainController',
views: ['MainTabPanel', 'UnitsTabPanel', 'SummariesTabPanel'],
mainTabPanel : {}, 
unitsTabPanel : {},
summariesTabPanel : {},
init: function(){
    console.log("main controller is init");
    console.log(this);

    this.control({
        'mainTabPanel':{
            afterrender: this.onCreate
        }
    });


    this.mainTabPanel = Ext.widget('mainTabPanel');
},

onCreate: function(){
    console.log("main tab panel is created");
    console.log(this);
    this.unitsTabPanel = Ext.widget('unitsTabPanel');
    this.summariesTabPanel = Ext.widget('summariesTabPanel');
}
});

This is the MainTabPanel:

Ext.define("FI.view.MainTabPanel", {
extend: 'Ext.tab.Panel',
renderTo:'container',
alias: 'widget.mainTabPanel',
enableTabScroll: true,
items:[{
        title:'Units',
        html: "<div id='units'></div>",
        closable: false
    },
    {title: 'Summaries',
        html: "<div id='summaries'></div>",
        closable:false
    }
]
});

And this is the SummariesTabPanel(the one with problems):

Ext.define("FI.view.SummariesTabPanel", {
extend: 'Ext.tab.Panel',
renderTo: 'summaries',
alias: 'widget.summariesTabPanel',
enableTabScroll: true
});

The problem is with the SummariesTabPanel. If I don’t create it, the UnitsTabPanel gets rendered. For some reason, it can’t find the summaries div.

Can you please tell me what is wrong?

  • 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-06T04:47:43+00:00Added an answer on June 6, 2026 at 4:47 am

    The SummariesTabPanel renders to the “units” div according to your last snippet of code, is that correct? If not, replace renderTo: 'units' with renderTo: 'summaries'.


    Edit

    Since it was not the case, you may take a look ath this piece of Ext 4 Panel documentation (here: http://docs.sencha.com/ext-js/4-0/#!/api/Ext.panel.Panel-cfg-html ) that says that the html content isn’t added until the component is completely rendered. So, you have to wait for the afterrender event of the tab (not the tabpanel, as you do now) before you can actually get the DOM element.

    If you instantiate this Panel

    {title: 'Summaries',
     html: "<div id='summaries'></div>",
     closable:false
    }
    

    and store the pointer to it into a separate variable, you could listen to its afterrender event and try again.

    A workaround to this could be using an existing element of the page (that is, a static html fragment) instead of adding it via the Panel’s html config option.

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

Sidebar

Related Questions

I am new to MVC architecture, have just started learning it, but I have
I don't have real understanding of the MVC model or Architecture yet but what
I am trying to program in MVC architecture. So, I have one HTML form
I have a PHP application that is built around the MVC architecture without any
I am new to ASP.net MVC architecture. I have read in some articles that
I have been trying to find the different between MVC and 3-tier architecture in
I am using ASP.NET MVC architecture.I have a telerik window on a button click,
Other SO threads have asked people if they prefer N-Tier or MVC architecture. I'm
By ASP.NET MVC plugin architecture, Plug-in architecture for ASP.NET MVC I have separated DLL(plugin)
I have been using an Object-Oriented MVC architecture for a web project, and all

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.