Docs Help

Terms, Icons, and Labels

Many classes have shortcut names used when creating (instantiating) a class with a configuration object. The shortcut name is referred to as an alias (or xtype if the class extends Ext.Component). The alias/xtype is listed next to the class name of applicable classes for quick reference.

Access Levels

Framework classes or their members may be specified as private or protected. Else, the class / member is public. Public, protected, and private are access descriptors used to convey how and when the class or class member should be used.

Member Types

Member Syntax

Below is an example class member that we can disect to show the syntax of a class member (the lookupComponent method as viewed from the Ext.button.Button class in this case).

lookupComponent ( item ) : Ext.Component
protected

Called when a raw config object is added to this container either during initialization of the items config, or when new items are added), or {@link #insert inserted.

This method converts the passed object into an instanced child component.

This may be overridden in subclasses when special processing needs to be applied to child creation.

Parameters

item :  Object

The config object being added.

Returns
Ext.Component

The component to be added.

Let's look at each part of the member row:

Member Flags

The API documentation uses a number of flags to further commnicate the class member's function and intent. The label may be represented by a text label, an abbreviation, or an icon.

Class Icons

- Indicates a framework class

- A singleton framework class. *See the singleton flag for more information

- A component-type framework class (any class within the Ext JS framework that extends Ext.Component)

- Indicates that the class, member, or guide is new in the currently viewed version

Member Icons

- Indicates a class member of type config

- Indicates a class member of type property

- Indicates a class member of type method

- Indicates a class member of type event

- Indicates a class member of type theme variable

- Indicates a class member of type theme mixin

- Indicates that the class, member, or guide is new in the currently viewed version

Class Member Quick-Nav Menu

Just below the class name on an API doc page is a row of buttons corresponding to the types of members owned by the current class. Each button shows a count of members by type (this count is updated as filters are applied). Clicking the button will navigate you to that member section. Hovering over the member-type button will reveal a popup menu of all members of that type for quick navigation.

Getter and Setter Methods

Getting and setter methods that correlate to a class config option will show up in the methods section as well as in the configs section of both the API doc and the member-type menus just beneath the config they work with. The getter and setter method documentation will be found in the config row for easy reference.

History Bar

Your page history is kept in localstorage and displayed (using the available real estate) just below the top title bar. By default, the only search results shown are the pages matching the product / version you're currently viewing. You can expand what is displayed by clicking on the button on the right-hand side of the history bar and choosing the "All" radio option. This will show all recent pages in the history bar for all products / versions.

Within the history config menu you will also see a listing of your recent page visits. The results are filtered by the "Current Product / Version" and "All" radio options. Clicking on the button will clear the history bar as well as the history kept in local storage.

If "All" is selected in the history config menu the checkbox option for "Show product details in the history bar" will be enabled. When checked, the product/version for each historic page will show alongside the page name in the history bar. Hovering the cursor over the page names in the history bar will also show the product/version as a tooltip.

Search and Filters

Both API docs and guides can be searched for using the search field at the top of the page.

On API doc pages there is also a filter input field that filters the member rows using the filter string. In addition to filtering by string you can filter the class members by access level, inheritance, and read only. This is done using the checkboxes at the top of the page.

The checkbox at the bottom of the API class navigation tree filters the class list to include or exclude private classes.

Clicking on an empty search field will show your last 10 searches for quick navigation.

API Doc Class Metadata

Each API doc page (with the exception of Javascript primitives pages) has a menu view of metadata relating to that class. This metadata view will have one or more of the following:

Expanding and Collapsing Examples and Class Members

Runnable examples (Fiddles) are expanded on a page by default. You can collapse and expand example code blocks individually using the arrow on the top-left of the code block. You can also toggle the collapse state of all examples using the toggle button on the top-right of the page. The toggle-all state will be remembered between page loads.

Class members are collapsed on a page by default. You can expand and collapse members using the arrow icon on the left of the member row or globally using the expand / collapse all toggle button top-right.

Desktop -vs- Mobile View

Viewing the docs on narrower screens or browsers will result in a view optimized for a smaller form factor. The primary differences between the desktop and "mobile" view are:

Viewing the Class Source

The class source can be viewed by clicking on the class name at the top of an API doc page. The source for class members can be viewed by clicking on the "view source" link on the right-hand side of the member row.

Ext JS 7.0.0


top

Ext JS - FAQ

Below you'll find answers to the most commonly asked questions regarding Ext JS. If you can't find an answer to your question, please visit the Ext JS forums or file a Support ticket.

You can also check all of our past "Support Tips" on the Sencha Blog for helpful tips and tricks to successfully navigate Ext JS.

If you believe that your question warrants addition to this page, please let us know!

Note: The following FAQ's apply to Ext 5 and higher unless otherwise specified.

What browsers does Ext JS Support?

Desktop

  • Microsoft Edge 12
  • IE8+ (standards mode only)
  • Firefox (PC & Mac)
  • Safari 11+(2017)
  • Safari 10(2016)
  • Chrome 43+(PC & Mac)
  • Opera (PC & Mac)

Touch Screen

  • Safari
  • IE10 and above
  • Chrome on Android

Note: Ext JS 5 does not currently support mobile phones

What Doctype should I use?

We recommend using the HTML5 doctype. To ensure that Internet Explorer does not activate Compatibility Mode (compatibility mode is unsupported), we also recommend using the X-UA-Compatible meta tag. For example:

<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
</head>

How can I build an application without Sencha Cmd?

You can build an application without Sencha Cmd by including the Framework, theme CSS, and your chosen theme's JS override in your index.html file's head.

The theme's CSS and override files are created as packages in Ext JS. In Ext JS 5 the themes are located within "{ExtJS-5-SDK}/packages/". Themes include:

  • ext-theme-base (used by the framework and should not be configured directly)
  • ext-theme-neutral (used when creating custom themes and should not be configured directly)
  • ext-theme-classic
  • ext-theme-gray
  • ext-theme-neptune
  • ext-theme-neptune-touch (optimized for tablets)
  • ext-theme-crisp
  • ext-theme-crisp-touch (optimized for tablets)

In Ext JS 6+ the themes are split between the classic and modern toolkits. The classic themes are located within "{ExtJS-7-SDK}/classic/" and include:

  • theme-base (used by the framework and should not be configured directly)
  • theme-neutral (used when creating custom themes and should not be configured directly)
  • theme-classic
  • theme-gray
  • theme-neptune
  • theme-neptune-touch (optimized for tablets)
  • theme-crisp
  • theme-crisp-touch (optimized for tablets)
  • theme-triton

Ext JS 7 modern themes are located within "{ExtJS-7-SDK}/modern/" and include:

  • theme-base (used by the framework and should not be configured directly)
  • theme-blackberry
  • theme-cupertino
  • theme-cupertino-classic
  • theme-mountainview
  • theme-neptune
  • theme-windows

Note: We do recommend using Sencha Cmd, as the above example includes a very large file that includes everything. When using Sencha Cmd, your application only gets the bits it requires, which keeps it lightweight, responsive, and clean.

The Getting Started guide will walk you through generating your application using Sencha Cmd.

What's the difference between the different framework files?

ext.js: Minified. Base framework that dynamically loads extended classes.

ext-all.js: Minified. Includes entire framework.

ext-all-debug.js: Not Minified. Includes entire framework

ext-debug.js: Not Minified. Base framework that dynamically loads extended classes.

ext-all-rtl-debug.js: Not Minified. Includes entire framework and right-to-left support.

ext-all-rtl-sandbox-debug.js: Not Minified. Includes entire framework and right-to-left support. Sandboxed to allow for use alongside other versions of Ext.

ext-all-rtl-sandbox.js: Minified. Includes entire framework and right-to-left support. Sandboxed to allow for use with alongside versions of Ext.

ext-all-rtl.js: Minified. Includes entire framework and right-to-left support.

ext-all-sandbox-debug.js: Not Minified. Includes entire framework sandboxed to allow for use with alongside versions of Ext.

ext-all-sandbox.js: Minified. Includes entire framework sandboxed to allow for use with alongside versions of Ext.

How can I change my application's theme without using Sencha Cmd?

To set an application's theme, simply include the theme package's CSS and JS override in your index.html's head. As an example:

<head>
     <title>Hello World</title>
        <link rel="stylesheet" type="text/css" href="ext/packages/ext-theme-neptune/build/resources/ext-theme-neptune-all.css">
        <script type="text/javascript" src="ext/build/ext-all-debug.js"></script>
        <script type="text/javascript" src="ext/packages/ext-theme-neptune/build/ext-theme-neptune.js"></script>
 <meta http-equiv="X-UA-Compatible" content="IE=edge">
</head>

Can I write a single application for both Desktop and iPad?

Yes, any Ext JS 5+ application should properly appear on desktop AND tablets or touch-screen devices with supported browsers. It should be noted that there are generally no extra steps necessary for tablet support.

That said, there are two areas that may need some attention in specific situations. The first will not affect developers who only use Ext JS API event listeners. However, if you are directly attaching listeners, or you are using a 3rd party JavaScript library that directly attaches listeners, issues may occur with the timing of directly attached event handlers. This has to do with some changes made to the event system in order to support touch gestures.

You can find more information about changes regarding event delegation in our events guide and our tablet support guide.

The second scenario deals with mouse events that don't have an obvious analog in the touch world. For instance, there are no touch equivalents for mouseover, mouseout, mousenter, or mouseleave.

It may be necessary to provide an alternate implementation for these interactions if that functionality is critical to your application. This often means substituting the mouse event with an appropriate touch gesture.

If Ext JS 5+ works with tablets, why shouldn't I use it for smart-phones as well?

The Desktop and Tablet controls aren't currently suited for small screens. Grids, trees, panels, border layouts just require more room for proper display. It may work, but it isn't exactly suitable for smaller screens.

With Ext JS 6, you can author a single, universal application optimized to run on destktop, tablet, and phone devices. The application may contain common event handling logic, stores, and models. The views used will be pulled from the classic toolkit (legacy Ext JS) and the modern toolkit (legacy Sencha Touch) depending on which device profile you're targeting. You can read more about he universal app setup in the Getting Started guide.

How can we share controllers, stores, models between ExtJs 5+ and Touch?

Ext JS 5+ and Sencha Touch are not optimized to share controllers, stores, and models.
However, they are shared between the modern and classic toolkits (Touch and legacy Ext JS views respecively) in Ext JS 6+. Refer to the Getting Started guide for additional information.

How can I see what changed between versions?

To see removals, additions, deprecations, etc, please check out our diff guides between versions:

Note: We believe developers can glean a lot of useful information by evaluating these diff guides when upgrading their applications. That said, these reports are automated and may not always accurately depict change. Unwanted change may be indicated due to doc updates, formatting omissions, etc. If you see anything in these reports that is incorrect or undesirable, please report them on the forums.

Does Ext JS 5+ render tables faster than ExtJS 4? Is the performance improved?

It is faster in some areas. Grid markup was changed in version 5 to use a table-per-row, which makes grid rendering significantly faster.

JS layout for form fields and buttons was eliminated in favor of "liquid" CSS layout. Performance improvements have been seen when using the "form layout" when producing large forms. These types of improvements should help with performance, but there is still work to be done. You can expect further performance improvements in the next release.

Is it possible to use two different versions of Ext JS at same time?

Yes, you can use a "sandboxed" build, which changes the top level JS namespace, and the CSS prefix to avoid conflicts. It is important to note that it is not recommended to sandbox two different versions in a production environment as this entails loading two full versions of the Ext JS framework.

This means that you'd be loading twice as many resources as a typical "non-sandboxed" application. Sandbox builds are generally used for migration or for a temporary need to include new features in an old application.

How should we utilize localization in Ext JS 7?

Adding localization to your application is possible via locale-specific overrides, which can be set in your Sencha Cmd generated app.json file. Please see the localization guide for more information.

How should I override a method without editing the source code?

The preferred way to create an override is as follows:

Ext.define('MyApp.overrides.panel.Panel', {
    override: 'Ext.panel.Panel',
    close: function() {
        console.log('My Change to Close');
        this.callParent();
    },
    helloWorld: function(){
       console.log('Hello World');
    }
});

1) First, define your override with an appropriate namespace for your application's overrides folder

2) Add the "override" config and give it a value equivalent to the class you are wanting to override. In this example, we're overriding Ext.panel.Panel.

3) Add the function you're looking to override. You'll need to make sure you keep all of the relevant pieces. In this case, I've only changed the close function by adding a console.log(). If you were to create a panel and then do panel.close(), you will receive a console message saying, "My Change to Close".

Note: In your overridden method you will need to execute this.callParent() to call the original method provided by the target class. To bypass that method and instead skip up to the superclass implementation (say to avoid a bug in the target class's method) you can invoke this.callSuper() instead.

4) Add a new function all together. As you may imagine, Ext.panel.Panel does not contain a helloWorld method. However, I've just added it via this override. Now, creating a panel and issuing panel.helloWorld() will result in logging the message "Hello World".

How do I use the Draw classes in 7?

The draw package is now included in the sencha-charts package. That said, you'll need to include sencha charts in order to utilize draw classes (or sencha charts).

If you're using Sencha Cmd, this is as simple as adding "sencha-charts" to the requires array in your app.json file.

Using Sencha Charts and Draw without Sencha Cmd

If you want to use charts, but do not want to use Sencha Cmd, you may simply add the following inclusions to your app's "index.html" page in Ext JS 7.

<script type="text/javascript" src="{ExtJS-7-SDK}/build/packages/sencha-charts/build/sencha-charts.js"></script>
<link rel="stylesheet" type="text/css" href="{ExtJS-7-SDK}/build/packages/sencha-charts/build/classic/resources/sencha-charts-all.css">

In Ext JS 7 using the classic toolkit:

<script type="text/javascript" src="{ExtJS-7-SDK}/build/packages/charts/classic/charts.js"></script>
<link rel="stylesheet" type="text/css" href="{ExtJS-7-SDK}/build/packages/charts/classic/classic/resources/charts-all.css">

In Ext JS 7 using the modern toolkit:

<script type="text/javascript" src="{ExtJS-7-SDK}/build/packages/charts/modern/charts.js"></script>
<link rel="stylesheet" type="text/css" href="{ExtJS-7-SDK}/build/packages/charts/modern/modern-neptune/resources/charts-all.css">

Does the framework support browser zoom?

In most cases zooming works as expected. However, it may take some extra work to properly render components when zoomed in. If you find an edge case let us know and we will queue it as an improvement.

What is callParent and why/how should I use it?

callParent is a method provided by the Sencha Class System that is used to call methods in your parent / ancestor class. This is commonly done when you derive from a framework class and override a method it provides such as onRender. When you invoke callParent from a method that has parameters, you have two ways you can pass along those parameters to the ancestor class method. The best practice method is to utilize only the parameters that you specifically need. In that case, you can pass these arguments in an array literal:

Ext.define('App.view.MyPanel', {
    extend: 'Ext.panel.Panel',
    onRender: function (parentNode, index) {
        this.callParent([ parentNode, index ]);
    }
});

Or, you could use the shorthand arguments keyword like so:

Ext.define('App.view.MyPanel', {
    extend: 'Ext.panel.Panel',
    onRender: function (parentNode, index) {
        this.callParent(arguments);
    }
});

The differences may seem minor, but when you use the Sencha Cmd optimizations for callParent, performance improvements can be profound. With the optimizer enabled, these two methods are optimized as follows:

onRender: function (parentNode, index) {
    Ext.panel.Panel.prototype.onRender.apply(this, arguments);
}

Or:

onRender: function (parentNode, index) {
    Ext.panel.Panel.prototype.onRender.call(this, parentNode, index);
}

In the second case, the optimizer is able to use the call method on the JavaScript Function instead of apply. We also avoid using arguments. Both of which are well-known high performance no-no's. It turns out that we even avoid creating the array literal. Obviously, just enabling the optimization is helpful, but in code where performance is most critical, it is worth replacing arguments with the explicit array.

Ext JS 7.0.0