Ext.data.JsonP.upgrade_42({"title":"Upgrade 4.1 to 4.2","guide":"

Ext JS 4.2 Upgrade Guide

\n
\n

Contents

\n
    \n
  1. ComboBox filters
  2. \n
  3. Menus
  4. \n
  5. Grids
  6. \n
  7. MVC
  8. \n
  9. Ext.Direct
  10. \n
  11. Containers
  12. \n
  13. Panel
  14. \n
  15. Buttons and Tabs
  16. \n
  17. Glyphs
  18. \n
  19. Class System
  20. \n
\n
\n\n

This guide will assist developers migrating from Ext JS 4.1.x to 4.2. As always our goal\nwas to maintain API compatibility as much as possible. The areas where changes were needed\nare described here to help you upgrade to Ext JS 4.2 as easily as possible.

\n\n

ComboBox filters

\n\n

Keystroke filtering of the store in a ComboBox is now implemented using the standard\nStore filtering mechanism and is independent of any other filters an application may add\nto the store.

\n\n

Menus

\n\n

Menu icon elements are now div elements in order that they can display the new glyph\nconfiguration as well as background images. This means that any high-specificity rules\nwhich made use of the img tag name to impose a background-image will have to change\nto use the div tag name.

\n\n

Grids

\n\n

In addition to the new bufferedrenderer plugin (Ext.grid.plugin.BufferedRenderer),\nmany more grid features work together than in previous releases. If some combination of\nstandard grid features or plugins does not work together, please report it to us -\nit is probably a bug!

\n\n

A locking grid's View now aggregates the columns from both sides, and offers more of the\ninterface of a true grid view. In particular, the getGridColumns method has been added.

\n\n

Row editing on a locked grid now produces one row editor which spans both sides.

\n\n

MVC

\n\n\n\n\n

Ext.Direct

\n\n\n\n\n

Containers

\n\n

Since version 4.0, i.e., in the Classic Theme, border:false was inherited by logic in the\nExt.container.AbstractContainer base class. This conflicted with the Neptune Theme\nrequirements and was removed. To restore this behavior, apply this override in your\napplication:

\n\n
Ext.define('Compat.container.AbstractContainer', {\n    override: 'Ext.container.AbstractContainer',\n\n    onBeforeAdd : function(item) {\n        this.callParent(arguments);\n\n        // If the parent has no border, only use an explicitly defined border\n        if (this.border === false || this.border === 0) {\n            var b = item.border;\n            item.border = Ext.isDefined(b) && b !== false && b !== 0;\n        }\n    }\n});\n
\n\n

Panel

\n\n

Panel dragging has been enhanced to allow for simple, portal-like dragging. To enable this\nmode on a draggable panels which are floating: true, add the new simpleDrag: true.

\n\n

This causes the Panel to use a simple ComponentDragger the same as Windows use so\nthat it simply makes the Panel mobile. It does not use the default Panel drag mechanism\nwhich uses the Ext.dd package (to allow the dragged Panel to interact with other\nExt.dd instances).

\n\n

The default behavior is there to allow things like portal panel dragging to interact with\nportal containers.

\n\n

Borders in Neptune

\n\n

Neptune is a (mostly) borderless design. Even so, you can always use the border config\nto enable borders and bodyBorder to enable borders on the body element of a panel. This\nimplies there is some inherent border styling that is being enabled which is correct. As\nin the Classic theme, there are CSS classes added to suppress the borders, but unlike in\nClassic, the Neptune theme uses one CSS class to suppress the undesired borders.

\n\n

While only one class is added to any element, there are 15 different classes declared in\n\"./packages/ext-theme-base/sass/src/layout/component/Dock.scss\" for this purpose. If\nnone of these classes are added, then the element will present its natural border. The\nclasses that suppress the border edges are as follows:

\n\n\n\n\n

Also in Neptune, the borders of the panel, its body and docked items are \"collapsed\" using\nanother class, again from another set of 15 classes found in\n\"./packages/ext-theme-base/sass/etc/mixins/border-management.scss\":

\n\n\n\n\n

Because this class has to impose the proper component and UI styling, these classes are\ngenerated for each component/UI combination using the border-management mixin. So the\n\"panel\" and \"default\" pieces of the above classes will vary for other components (such as\n\"window\") and UI names.

\n\n

Buttons and Tabs

\n\n

The Ext.button.Button has changed its rendering to no longer render a button element.\nThis (greatly) simplifies the styling required for IE and the resulting button layout code.\nThe appropriate Aria role is added for accessibility concerns, but all Buttons now render\nan a (anchor) tag.

\n\n

Glyphs

\n\n

Buttons, tabs, panel headers and menu items now support a glyph configuration that is\nsimilar to iconCls and icon. The glyph uses Web Fonts to convert a character in to\na scalable image. To take advantage of this, you will need to pick out your own glyphs and\nproduce your own font-family. See the Ext.button.Button class and its glyph config\nfor further details.

\n\n

Class System

\n\n

We have added a callSuper method for situations where you need to patch/replace a method\non the target class in an override. This method should only be needed when an override\nneeds to workaround the behavior of a specific method it is designed to replace so is not\nsomething to use in most cases. The typical use cases should still use callParent.

\n"});