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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T08:10:41+00:00 2026-06-18T08:10:41+00:00

I am new to ExtJS. I started to program a little form. And I

  • 0

I am new to ExtJS. I started to program a little form. And I got completely confused about the use of Ext.create and the new operator.

So here is the code:

I wanted to program a form. I found a small example on one of the sencha pages. It creates a form like this:

var descAndSystem = new Ext.form.Panel ({
    region: 'center',
    layout: 'vbox',
    margins: '5 5 5 5',
    xtype: 'form',
    title: 'Some title',
    id: 'descAndSystem',
    width: '800', 
    items: [
       { xtype: 'textarea',
     fieldLabel: 'Provide a description',
     name: 'rightdescription',
       },
       {
      xtype: 'combobox',
      fieldLabel: 'Choose System',
      store: systems,
      queryMode: 'local',
      displayField: 'name',
      valueField: 'name',
      name: 'system'
       }
    ]
});

then I used descAndSystem as component in a viewport:

Ext.create('Ext.container.Viewport', {
    layout: 'border',
    id: 'wizardcontainer',
    items: [
        descAndSystem,
        {
            region: 'south', 
            layout: 'hbox',
            margins: '5 5 5 5',
            items: [
               { xtype: 'button', text: '<< Back', handler: onNext },
               { xtype: 'button', text: 'Next >>', handler: onNext },
               { xtype: 'button', text: 'Cancel', align: 'right', handler: function () { alert ('Abgebrochen geklickt.'); } }
            ]
        }
   ]
});

After a lot of trial and error I found that I can access the values of my form by the following code:

Ext.getCmp ('descAndSystem').getForm ().findField ('rightdescription').getValue ()

in contrast to what one of the books I bought said the following code did NOT work:

Ext.getCmp ('rightdescription').getValue ()

But my real problem is that I would expect that

Ext.create ('Ext.form.Panel', { .... });

is the same as

new Ext.form.Panel ( {...});

But when I do the latter the Chrome interpreter says:

Uncaught TypeError: Cannot read property 'Panel' of undefined'

Again, after a lot of trial and error, the following worked:

new Ext.Panel ( {...});

Not only that I couldn’t find any reference to an object of that name in the documentation, also the line

Ext.getCmp ('descAndSystem').getForm ().findField ('rightdescription').getValue ()

now yields an error:

Uncaught TypeError: Object [object Object] has no method 'getForm'

In addition, I was trying to replace descAndSystem by another form by DOM manipulation, there are various replace methods in the documentation. None of them worked, I always got the error message “has no method ‘replace'”.
I have the strong suspicion that I got something wrong fundamentally. Any hints? I am using ExtJS 4 and Chromium 17.0.963.56 on Ubuntu 10.10 64-bit.

  • 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-18T08:10:42+00:00Added an answer on June 18, 2026 at 8:10 am

    The major difference is that Ext.create('Ext.form.Panel') will automatically download the appropriate javascript file if the Ext.form.Panel class does not exist. The vanilla new operator can not do this – it has no idea what a Ext.form.Panel might be or where the definition might be found.

    The Cannot read property ‘Panel’ of undefined’ error indicates that not only is Ext.form.Panel not defined, neither is the parent Ext.form namespace object.

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

Sidebar

Related Questions

I'm using ExtJS to create a formPanel: new Ext.FormPanel({ labelAlign: 'top', title: 'Loading Contact...',
In my extjs column model, here is what i have: new Ext.grid.ColumnModel({ columns: [
I'm getting started with ExtJs. I'm building a very simple login form: Ext.onReady(function ()
I am new to ExtJs. I need to create an entry form in 2
I am new at Extjs and Sencha. i started to design my UI and
// Using extjs 3.x var box = new Ext.Textfield { /* textField configuration */
I am working with ExtJS 4.1.1a and I am trying to create a new
I am creating a new ExtJS widget using Ext.view.View. The template for this view
I am new to ExtJs and I am trying to follow this tutorial: http://docs.sencha.com/ext-js/4-0/#!/guide/application_architecture
I have a jsp with ExtJs application. I click a button new Ext.Window appers

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.