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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T11:07:36+00:00 2026-05-30T11:07:36+00:00

I’m newbie with ext js, a client wants me to use it in some

  • 0

I’m newbie with ext js, a client wants me to use it in some web, so, i’m crushing my head with it, i’m using ext js 4.0.7 and what they call MVC. Here i go.

I’m creating a “panel” with “card layout”, and i want the items to be loaded dynamically, so i’m using a “loader”. Here is an example of what i’m doing

//the panel
{
  xtype:'panel',
  id: 'options-panel',
  title: 'Options',
  region:'north',
  layout:"card",
  activeItem:0,
  height: 200,
  autoScroll: true,
  items:{
    loader:{
      autoLoad : true,
      url: '/staticdata/menu-toolbar-data.json',
      renderer: "component"
    } 
  }
}

//example data file menu-toolbar-data.json
[
  {
    xtype:'toolbar',
    vertical: true,
    height: 173,
    id:"button1-toolbar",
    layout: {
      type: 'vbox',
      align : 'stretch',
      pack  : 'start'
    },
    items: [
      {
        text: 'Gestion Button1',
        enableToggle: true
      },'-',
      {
        text: 'Selection Button1',
        enableToggle: true
      }
    ]
  },
  {
    xtype:'toolbar',
    vertical: true,
    height: 173,
    id:"button2-toolbar",
    layout: {
      type: 'vbox',
      align : 'stretch',
      pack  : 'start'
    },
    items: [
      {
        text: 'G Button2',
        enableToggle: true
      },'-',{
        text: 'S Button2',
        enableToggle: true
      }
    ]
  } 
]  

So far so good, I can see the 1st toolbar with the buttons. This is ok, but when I try to activate the second toolbar, I get an error. I’m using this:

Ext.getCmp('options-panel').layout.setActiveItem(1);  

with firebug, i can see this in the console:

TypeError: component is undefined
http://www.learningext.com.localhost/extjs/src/ComponentManager.js?_dc=1330059491008
Line 55  

The funny thing here is that if I copy the code from the .json file and paste it in the “items” of the “panel” I’m ceating, meaning not using the “loader”, everything works ok! If I keep the “loader” but change the panel’s layout, I can see the 2 toolbars, so what am I missing here? Is the loader not working as it should, or am I doing something wrong? Hope you can help me with this.

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-30T11:07:38+00:00Added an answer on May 30, 2026 at 11:07 am

    Ext.Loader is only for loading full classes. If you’re loading to just load a JSON block as child items of a container, you can use the ComponentLoader class.

    There’s several examples of it here: http://dev.sencha.com/deploy/ext-4.0.0/examples/component-loader/component-loader.html

    The last of which is probably the kind of thing you’re trying to achieve.

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

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I am using Paperclip to handle profile photo uploads in my app. They upload
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
Seemingly simple, but I cannot find anything relevant on the web. What is the

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.