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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T19:25:56+00:00 2026-06-15T19:25:56+00:00

In Extjs 4.1, I am attempting to set an active tab. The code for

  • 0

In Extjs 4.1, I am attempting to set an active tab. The code for the tab panel (and tab) is below:

var mainmsg = {
    title: "In Box",
    id: "Main",
    items: [
       ...
    ]
};

var magtags = Ext.create('Ext.tab.Panel',{
width: '100%',
height: 440,
layout: 'fit',
items: [ mainmsg,<other panels> ]
});

I would like to set the "mainmsg" panel active (selected?) when an event occurrs (like a button press in another panel). I am doing this using the setActivePanel() method documented for the TabPanel magtags, as shown below:

someEvent(params) {
    magtags.setActiveTab(mainmsg);
    ... do other stuff...
}

but when I make the call to setActiveTab(), I get the following error on Firebug:

Timestamp: 12/10/2012 3:59:25 PM

Error: TypeError: comp.getItemId is not a function

Have I found a bug in ExtJS? or is there some way to prevent this error which appears to be internal to the library?

Someone please advise…

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

    Because mainmsg is just a config for an object, when it gets passed to the items configuration it gets created as an actual component, but the mainmsg reference is still just a config. setActiveTab assumes you’re passing it either:

    1. The id of the component
    2. The index of the component
    3. The component instance

    A few other points:

    • A width of 100% is redundant, that’s not supported
    • A layout ‘fit’ on a tab panel is redundant, it automatically uses a card layout
    • You’re probably over-nesting your tab items, since the tab has a title and no layout and then child items, it usually means the child item should be the tab, not be nested inside anything else.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using ExtJS 4. I have created a tree panel as var treeStore
// Using extjs 3.x var box = new Ext.Textfield { /* textField configuration */
I am attempting to create a password requirements help box in ExtJS. It is
Using ExtJs. I'm trying to design a main which is divided into three sub
The Extjs API site adds a new tab for each search you do. The
ExtJS Version : 4.1.0 Answered - See my response below... quite silly really I
in ExtJs 4.0.2 for requred field indication, i'm using this code: Ext.override(Ext.layout.Layout, { renderItem:
I'm working with ExtJs framework and so have to code a lot of JS
in extjs 3.3.0, i can do that like this var row = grid.getView().getRow(0); var
I am using extjs 4.0.7. I want to disabled tab and Enter key event

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.