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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T22:53:02+00:00 2026-05-24T22:53:02+00:00

Here, i’m registering my app: App = new Ext.Application({ name: App, launch: function() {

  • 0

Here, i’m registering my app:

App = new Ext.Application({
  name: "App",

  launch: function() {
    this.views.viewport = new this.views.Viewport();
  }
});

This is the way i register new panels and components. I put each of them into seperate js files.

App.views.Viewport = Ext.extend(Ext.TabPanel, {
    fullscreen: true,

    tabBar: {
      dock: 'bottom',
      layout: {
        pack: 'center'
      }
    },

    items: [
      {
        xtype: 'cPanel'
      },
      {
        xtype: 'anotherPanel'
      }
    ]
});

// register this new extended type
Ext.reg('App.views.viewport', App.views.Viewport);

I added the other components in the same manner.

In one my components which is a list view, I want to change the container panel’s activeItem with another panel when tappen on an item, like this: ( Viewport contains this container panel)

App.views.ListApp = Ext.extend(Ext.List, {
  store: App.store,
  itemTpl: "...",
  onItemDisclosure: function(record) {
    App.detailPanel.update(record.data);
    App.cPanel.setActiveItem("detailPanel");
  },
  listeners: {
    itemtap: function(view, index, item, e) {   
        var rec = view.getStore().getAt(index);
        App.views.detailPanel.update(rec.data);
        App.views.cPanel.setActiveItem("detailPanel", {type:"slide", direction: "left"});
    }
  }

});

App.views.detailPanel.update(rec.data);

But it says: can’t call method “update” of undefined

I tried different variations on that line, like:
App.detailPanel.update(rec.data);
and i tried to give detailPanel and cPanel ids, where they were added to their container panel, and tried to reach them with Ext.get(), but none of these worked.

What is the problem here?

And any other advices would be appreciated.
Thanks.

  • 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-05-24T22:53:02+00:00Added an answer on May 24, 2026 at 10:53 pm

    The lazy way: give the panels ids and use:

    Ext.getCmp(id)
    

    The recommended way: Assign itemId to your panel and use:

    App.views.viewport.getComponent(itemId)
    

    This will allow you to have more than one instance of the same component at aby given time, the first example is not valid cause you can only have a singular id in the DOM tree.

    Also getComponent only works for components stored in the items collection.

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

Sidebar

Related Questions

Here's my problem I have this javascript if (exchRate != ) { function roundthecon()
Here's a coding problem for those that like this kind of thing. Let's see
Here is the scenario: I'm writing an app that will watch for any changes
Here's an excerpt from java.text.CharacterIterator documentation: This interface defines a protocol for bidirectional iteration
Here's my function: static Map AddFormation(Map _map, Tile tile, int x, int y, int
Here is my javascript code for a cursor focus function to go to username
Here is what I want to do. Use this HTML line and have the
Here is what I am trying to achieve in PHP: I have this string:
Here's my test function (c#, visual studio 2010): [TestMethod()] public void TestGetRelevantWeeks() { List<sbyte>
Here is my question. I am having this simple menu. <div id=menu> <ul> <li>

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.