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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T19:19:53+00:00 2026-06-11T19:19:53+00:00

I am new to ExtJs, just stepped into some basic things and found that

  • 0

I am new to ExtJs, just stepped into some basic things and found that its very hard to get started as a beginner.

Below are the two ways of implementing Ext button:

Sample1:

var nextBtn = new Ext.Button({
    text: 'Next >>',
    handler: function() {
        Ext.getDom('form_main').submit();
    },
    id: 'next',
    renderTo: 'next'
});

Sample2:

Ext.widget('button', {
text: 'some long title of my cool button',
scale: 'large',
cls: 'my-button',
width: 100,
renderTo: 'output'
});

My guess is beacuse of the version, it has changed. Please let me know what is the difference between these two codes.

Regards,

  • 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-11T19:19:54+00:00Added an answer on June 11, 2026 at 7:19 pm

    There are many ways to instantiate a class in ExtJS.

    Take this definition as example:

    Ext.define ('Ext.button.Button', {
      alias: 'widget.button' ,
      // here other properties and methods ...
    });
    

    Then you can chose one of these ways to instantiate Ext.button.Button:

    First: javascript style

    var button = new Ext.button.Button ({
      // props and methods
    });
    

    Second: ExtJS style with Ext.create method

    var button = Ext.create ('Ext.button.Button', {
      // props and methods
    });
    

    Third: ExtJS style with Ext.widget method (it uses alias property)

    var button = Ext.widget ('button', {
      // props and methods
    });
    

    I suggest you to use the second or the third way because they use ExtJS dynamic loader: here’s the documentation

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

Sidebar

Related Questions

I'am new to extJS and maybe I just don't know the correct strategy, so
I am very new to ExtJS and still going through the Docs in Sencha
I am new at Extjs and Sencha. i started to design my UI and
I'm fairly new to ExtJS. I adopted some examples and added the functionality to
I'm still new to ExtJS and I cannot figure out how to get code-generated
I am very new to ExtJS and JS... I have an xtype: lable in
I've just recently started working with ExtJS and Node.js, and I'm not quite sure
I've just noticed that my extJS grid,which uses a CheckboxSelectionModel, actually shows two checkboxes
I've just run into a display glitch in IE6 with the ExtJS framework. -
using ExtJS 3 here. I just noticed (in reply to my previous question) that

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.