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.
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.
Public classes and class members are available for use by any other class or application code and may be relied upon as a stable and persistent within major product versions. Public classes and members may safely be extended via a subclass.
Protected class members are stable public
members intended to be used by the
owning class or its subclasses. Protected members may safely be extended via a subclass.
Private classes and class members are used internally by the framework and are not intended to be used by application developers. Private classes and members may change or be omitted from the framework at any time without notice and should not be relied upon in application logic.
static
label next to the
method name. *See Static below.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).
Let's look at each part of the member row:
lookupComponent
in this example)( item )
in this example)Ext.Component
in this case). This may be omitted for methods that do not
return anything other than undefined
or may display as multiple possible values
separated by a forward slash /
signifying that what is returned may depend on the
results of the method call (i.e. a method may return a Component if a get method calls is
successful or false
if unsuccessful which would be displayed as
Ext.Component/Boolean
).PROTECTED
in
this example - see the Flags section below)Ext.container.Container
in this example). The source
class will be displayed as a blue link if the member originates from the current class
and gray if it is inherited from an ancestor or mixed-in class.view source
in the example)item : Object
in the example).undefined
a "Returns" section
will note the type of class or object returned and a description (Ext.Component
in the
example)Available since 3.4.0
- not pictured in
the example) just after the member descriptionDefaults to: false
)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.
classInstance.method1().method2().etc();
false
is returned from
an event handler- 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
- 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
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.
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.
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.
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 and inheritance. 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.
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:
Ext.button.Button
class has an alternate class name of Ext.Button
). Alternate class
names are commonly maintained for backward compatibility.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.
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:
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.
Represents the PivotTable root element for non-null PivotTables. There exists one pivotTableDefinition for each PivotTableDefinition part.
(CT_PivotTableDefinition)
Specifies the identifier of the related PivotCache definition. This Id is listed in the pivotCaches collection in the workbook part.
Defaults to: null
Specifies the name of the value area field header in the PivotTable. This caption is shown in the PivotTable when two or more fields are in the values area.
Defaults to: 'Values'
If true apply legacy table autoformat alignment properties.
Defaults to: false
Sets the value of applyAlignmentFormats
applyAlignmentFormats : Boolean
If true apply legacy table autoformat border properties.
Defaults to: false
Sets the value of applyBorderFormats
applyBorderFormats : Boolean
If true apply legacy table autoformat font properties.
Defaults to: false
Sets the value of applyFontFormats
applyFontFormats : Boolean
If true apply legacy table autoformat number format properties.
Defaults to: false
Sets the value of applyNumberFormats
applyNumberFormats : Boolean
If true apply legacy table autoformat pattern properties.
Defaults to: false
Sets the value of applyPatternFormats
applyPatternFormats : Boolean
If true apply legacy table autoformat width/height properties.
Defaults to: true
Sets the value of applyWidthHeightFormats
applyWidthHeightFormats : Boolean
Specifies a boolean value that indicates whether an asterisks should be displayed in subtotals and totals when visual totals are not used in OLAP -based PivotTables.
A value of 1 or true indicates an asterisks are displayed in subtotals and totals for OLAP PivotTables when visual tools are not available.
A value of 0 or false indicates an asterisk will not be displayed. This attribute depends on the implementation and availability of visual tools in the application user interface.
Defaults to: null
Sets the value of asteriskTotals
asteriskTotals : Boolean
Identifies which legacy table autoformat to apply.
Use a value >= 4096 and <= 4117.
Annex G of the file c061750_ISO_IEC_29500-1_2012.pdf contains a listing of the supported PivotTable AutoFormats, example formatting, and a sample workbook with each of those AutoFormats applied.
Defaults to: 4096
Set to true
to auto generate an id if none is defined.
Defaults to: true
Sets the value of autoGenerateId
autoGenerateId : Boolean
Represents the pivotCacheDefinition part.
Defaults to: {}
Returns the value of cacheDefinition
Sets the value of cacheDefinition
cacheDefinition : Ext.exporter.file.ooxml.excel.PivotCacheDefinition
Specifies the next chart formatting identifier to use on the PivotTable.
Defaults to: null
Represents the collection of fields that are on the column axis of the PivotTable.
Defaults to: null
Sets the value of colFields
colFields : Ext.exporter.file.ooxml.excel.Field[]
Specifies a boolean value that indicates whether grand totals should be displayed for the PivotTable columns.
A value of 1 or true indicates grand totals should be displayed.
A value of 0 or false indicates grand totals should not be displayed for PivotTable columns.
Defaults to: null
Sets the value of colGrandTotals
colGrandTotals : Boolean
Specifies the string to be displayed in column header in compact mode. This attribute depends on whether the application implements a compact mode for displaying PivotTables in the user interface.
Defaults to: null
Sets the value of colHeaderCaption
colHeaderCaption : String
Represents the collection of column items of the PivotTable.
Defaults to: null
Sets the value of colItems
colItems : Ext.exporter.file.ooxml.excel.Item[]
Specifies a boolean value that indicates whether new fields should have their compact flag set to true.
A value of 1 or true indicates new fields should default to compact mode equal to true.
A value of 0 or false indicates new fields should default to compact mode equal to false. This attribute depends on whether the application implements a compact mode in the user interface.
Defaults to: false
Specifies a boolean value that indicates whether the field next to the data field in the PivotTable should be displayed in the same column of the spreadsheet
Defaults to: false
Specifies the version of the application that created the cache. This attribute is application-dependent.
Defaults to: null
Sets the value of createdVersion
createdVersion : Number
Specifies a boolean value that indicates whether the "custom lists" option is offered when sorting this PivotTable.
A value of 1 or true indicates custom lists are offered when sorting this PivotTable.
A value of 0 or false indicates custom lists are not offered. This attribute depends on the implementation of sorting features in the application.
Defaults to: null
Sets the value of customListSort
customListSort : Boolean
Represents the collection of items in the data region of the PivotTable.
Defaults to: null
Sets the value of dataFields
dataFields : Ext.exporter.file.ooxml.excel.DataField[]
Specifies a boolean value that indicates whether the field representing multiple fields in the data region is located in the row area or the column area.
A value of 1 or true indicates that this field is located in the row area.
A value of 0 or false indicates that this field is located in the column area.
Defaults to: null
Specifies the position for the field representing multiple data field in the PivotTable, whether that field is located in the row area or column area.
Missing attribute indicates this field is last, or innermost in the field list.
2 indicates this field is third in the field list, and increasing values follow this pattern.
If this value is higher than the number of fields in the field list, then this field is last, or innermost in the field list.
Defaults to: null
Specifies a boolean value that indicates whether to disable the PivotTable field list.
A value of 1 or true indicates the field list, or similar mechanism for selecting fields in the user interface, is disabled.
A value of 0 or false indicates the field list is enabled.
Defaults to: null
Sets the value of disableFieldList
disableFieldList : Boolean
Specifies a boolean value that indicates whether the user is allowed to edit the cells in the data area of the PivotTable.
A value of 1 or true indicates the user can edit values in the data area.
A value of 0 or false indicates the cells in the data area are not editable.
Defaults to: null
Specifies a boolean value that indicates whether the user is prevented from drilling down on a PivotItem or aggregate value.
A value of 1 or true indicates the user can drill down on a pivot item or aggregate value.
A value of 0 or false indicates the user is prevented from drilling down pivot item.
Defaults to: null
Specifies a boolean value that indicates whether the user is prevented from displaying PivotField properties.
A value of 1 or true indicates the user can display pivot field properties.
A value of 0 or false indicates the user cannot display pivot field properties. This attribute depends on how pivot field properties are exposed in the application user interface.
Defaults to: null
Sets the value of enableFieldProperties
enableFieldProperties : Boolean
Specifies a boolean value that indicates whether the user is prevented from displaying the PivotTable wizard.
A value of 1 or true indicates the user can display the PivotTable wizard.
A value of 0 or false indicates the user can not display the PivotTable wizard. This attribute depends on whether the application exposes a wizard or similar mechanism for creating and working with PivotTables in the user interface.
Defaults to: null
Specifies the string to be displayed in cells that contain errors.
Defaults to: null
Specifies a boolean value that indicates whether fields in the PivotTable are sorted in non-default order in the field list.
A value of 1 or true indicates fields for the PivotTable are sorted in the field list. The sort order from the data source is applied for range-based PivotTables. Alphabetical sorting is applied for external data PivotTables.
A value of 0 or false indicates fields in the field list are not sorted.
Defaults to: null
Sets the value of fieldListSortAscending
fieldListSortAscending : Boolean
Specifies a boolean value that indicates whether the row and column titles from the PivotTable should be printed.
A value of 1 or true indicates row and column titles should be printed.
A value of 0 or false indicates row and column titles should not be printed.
Defaults to: null
Sets the value of fieldPrintTitles
fieldPrintTitles : Boolean
Defaults to: null
Note Do not rename the config names that are part of the attributes
since they are
mapped to the xml attributes needed by the template.
Defaults to: true
Specifies the string to be displayed for grand totals.
Defaults to: null
Sets the value of grandTotalCaption
grandTotalCaption : String
Specifies a boolean value that indicates whether the in-grid drop zones should be displayed at runtime, and whether classic layout is applied.
A value of 1 or true indicates in-grid drop zones should be displayed and classic layout should be applied to the PivotTable.
A value of 0 or false indicates in-grid drop zones should be disabled and classic layout should not be applied.
Note: Grid drop zones are optional runtime UI, determined by the application, that indicate to the user the locations of the page, row, column, and data fields in the PivotTable report. See layout discussion under pivotTableDefinition for the precise locations of these areas.
Defaults to: null
Specifies a boolean value that indicates whether PivotTable immersive experience user interface should be turned off.
A value of 1 or true indicates the PivotTable immersive experience should be turned off for this PivotTable.
A value of 0 or false indicates the immersive experience should be left on. This attribute depends on whether the application implements an immersive experience in the user interface.
Defaults to: null
Specifies the indentation increment for compact axis and can be used to set the Report Layout to Compact Form.
Defaults to: null
Defaults to: null
Specifies a boolean value that indicates whether PivotItem names should be repeated at the top of each printed page.
A value of 1 or true indicates pivot items names should be repeated at the top of each page.
A value of 0 or false indicates should not be repeated.
Defaults to: true
Sets the value of itemPrintTitles
itemPrintTitles : Boolean
Represents location information for the PivotTable.
Defaults to: {}
Sets the value of location
location : Ext.exporter.file.ooxml.excel.Location
Specifies a boolean value that indicates whether MDX sub-queries are supported by OLAP data provider for this PivotTable.
A value of 1 or true indicates MDX sub-queries are supported by the OLAP data provider.
A value of 0 or false indicates MDX sub-queries are not supported.
Defaults to: null
Specifies a boolean value that indicates whether row or column titles that span multiple cells should be merged into a single cell.
A value of 1 or true indicates that titles that span multiple cells are merged into a single cell.
A value of 0 or false indicates titles are not merged.
Defaults to: null
Specifies the minimum version of the application required to update this PivotTable view. This attribute is application-dependent.
Defaults to: null
Sets the value of minRefreshableVersion
minRefreshableVersion : Number
Specifies the string to be displayed in cells with no value
Defaults to: null
Sets the value of missingCaption
missingCaption : String
Specifies a boolean value that indicates whether the fields of a PivotTable can have multiple filters set on them.
A value of 1 or true indicates the fields of a PivotTable can have multiple filters.
A value of 0 or false indicates the fields of a PivotTable can only have a simple filter.
Defaults to: false
Sets the value of multipleFieldFilters
multipleFieldFilters : Boolean
Specifies a boolean value that indicates whether new fields should have their outline flag set to true.
A value of 1 or true indicates new fields are created with outline equal to true.
A value of 0 or false indicates new fields are created with outline equal to false.
Defaults to: true
Specifies a boolean value that indicates whether data fields in the PivotTable should be displayed in outline form.
A value of 1 or true indicates data fields will display in outline form.
A value of 0 or false indicates data fields will not display in outline form.
Defaults to: null
Represents the collection of items in the page or report filter region of the PivotTable.
Defaults to: null
Sets the value of pageFields
pageFields : Ext.exporter.file.ooxml.excel.PageField[]
Specifies a boolean value that indicates how the page fields are laid out when there are multiple PivotFields in the page area.
A value of 1 or true indicates the fields will display "Over, then down"
A value of 0 or false indicates the fields will display "down, then Over"
Defaults to: null
Sets the value of pageOverThenDown
pageOverThenDown : Boolean
Specifies the name of the style to apply to each of the field item headers in the page area of the PivotTable.
Defaults to: null
Specifies the number of page fields to display before starting another row or column.
Defaults to: null
Represents the collection of fields that appear on the PivotTable.
Defaults to: null
Sets the value of pivotFields
pivotFields : Ext.exporter.file.ooxml.excel.PivotField[]
Specifies the name of the style to apply to the main table area of the PivotTable.
Defaults to: null
Sets the value of pivotTableStyle
pivotTableStyle : String
Represent information on style applied to the PivotTable.
Defaults to: {}
Returns the value of pivotTableStyleInfo
Sets the value of pivotTableStyleInfo
pivotTableStyleInfo : Ext.exporter.file.ooxml.excel.PivotTableStyleInfo
Specifies a boolean value that indicates whether the formatting applied by the user to the PivotTable cells is discarded on refresh.
A value of 1 or true indicates the formatting applied by the end user is discarded on refresh.
A value of 0 or false indicates the end-user formatting is retained on refresh.
Defaults to: null
Sets the value of preserveFormatting
preserveFormatting : Boolean
Specifies a boolean value that indicates whether drill indicators expand collapse buttons should be printed.
A value of 1 or true indicates that these buttons should be printed.
A value of 0 or false indicates that these buttons should not be printed.
Defaults to: null
Specifies a boolean value that indicates whether data fields in the PivotTable are published and available for viewing in a server rendering environment.
A value of 1 or true indicates that the data fields in the PivotTable are published and shall be available for viewing in a server rendering environment.
A value of 0 or false indicates that the data fields in the PivotTable are not published and shall not be available for viewing in a server rendering environment.
Defaults to: null
Defaults to: null
Defaults to: { contentType: { contentType: 'application/vnd.openxmlformats-package.relationships+xml' } }
Represents the collection of row fields for the PivotTable.
Defaults to: null
Sets the value of rowFields
rowFields : Ext.exporter.file.ooxml.excel.Field[]
Specifies a boolean value that indicates whether grand totals should be displayed for the PivotTable rows. The default value for this attribute is true.
A value of 1 or true indicates grand totals are displayed for the PivotTable rows.
A value of 0 or false indicates grand totals will not be displayed.
Defaults to: null
Sets the value of rowGrandTotals
rowGrandTotals : Boolean
Specifies the string to be displayed in row header in compact mode.
Defaults to: null
Sets the value of rowHeaderCaption
rowHeaderCaption : String
Represents the collection of items in row axis of the PivotTable.
Defaults to: null
Sets the value of rowItems
rowItems : Ext.exporter.file.ooxml.excel.Item[]
Specifies a boolean value that indicates whether calculated members should be shown in the PivotTable view. This attribute applies to PivotTables from OLAP-sources only.
A value of 1 or true indicates that calculated members should be shown.
A value of 0 or false indicates calculated members should not be shown.
Defaults to: null
Specifies a boolean value that indicates whether the drop-down lists for the fields in the PivotTable should be hidden. This attribute depends on whether the application implements drop down lists or similar mechanism in the user interface.
A value of 1 or true indicates drop down lists are displayed for fields.
A value of 0 or false indicates drop down lists will not be displayed.
Defaults to: null
Sets the value of showDataDropDown
showDataDropDown : Boolean
Specifies a boolean value that indicates whether tooltips should be displayed for PivotTable data cells.
A value of 1 or true indicates tooltips are displayed.
A value of 0 or false indicates tooltips will not be displayed. This attribute depends on whether the application employs tooltips or similar mechanism in the user interface.
Defaults to: null
Specifies a boolean value that indicates whether drill indicators should be hidden.
A value of 1 or true indicates drill indicators are displayed.
A value of 0 or false indicates drill indicators will not be displayed.
Defaults to: null
Specifies a boolean value that indicates whether the PivotTable should display large drop zones when there are no fields in the data region.
A value of 1 or true indicates a large drop zone is displayed.
A value of 0 or false indicates a large drop zone will not be displayed.
Defaults to: null
Specifies a boolean value that indicates whether to include empty columns in the table.
A value of 1 or true indicates empty columns are included in the PivotTable.
A value of 0 or false indicates empty columns are excluded.
Defaults to: null
Specifies a boolean value that indicates whether to include empty rows in the table.
A value of 1 or true indicates empty rows are included in the PivotTable.
A value of 0 or false indicates empty rows are excluded.
Defaults to: null
Specifies a boolean value that indicates whether to show error messages in cells.
A value of 1 or true indicates error messages are shown in cells.
A value of 0 or false indicates error messages are shown through another mechanism the application provides in the user interface.
Defaults to: null
Specifies a boolean value that indicates whether to suppress display of pivot field headers.
A value of 1 or true indicates field headers are shown in the PivotTable.
A value of 0 or false indicates field headers are excluded.
Defaults to: null
Specifies a boolean value that indicates whether to display item names when adding a field onto a PivotTable that has no data fields.
A value of 1 or true indicates item names are displayed.
A value of 0 or false indicates item names will not be displayed.
Defaults to: null
Specifies a boolean value that indicates whether member property information should be omitted from PivotTable tooltips.
A value of 1 or true indicates member property information is included.
A value of 0 or false indicates member property information is excluded. This attribute depends on whether the application employs tooltips or similar mechanism in the user interface.
Defaults to: null
Sets the value of showMemberPropertyTips
showMemberPropertyTips : Boolean
Specifies a boolean value that indicates whether to show a message in cells with no value.
A value of 1 or true indicates to show a message string in cells without values.
A value of 0 or false indicates no message string will shown in cells without values.
Defaults to: null
Specifies a boolean value that indicates whether a page field with multiple selected items should display "(multiple items)" instead of "All". This attribute applies only to non-OLAP PivotTables. The messages displayed depend on the application implementation.
A value of 1 or true indicates a different message string is displayed for a page field with multiple items.
A value of 0 or false indicates the same message string is displayed for all page fields.
Defaults to: null
Sets the value of showMultipleLabel
showMultipleLabel : Boolean
Specifies a boolean value that indicates whether data for hidden pivotItems for PivotFields in the data area should be included in subtotals.
A value of 1 or true indicates that data for hidden pivot items in the data area is included in subtotals.
A value of 0 or false indicates hidden pivot items will not be included in subtotals.
Defaults to: null
Sets the value of subtotalHiddenItems
subtotalHiddenItems : Boolean
Specifies a user-defined string that is associated with this PivotTable.
Defaults to: null
Defaults to: []
Defaults to: [ 'idPrefix', 'id', 'autoGenerateId', 'self', 'tplAttributes', 'tplNonAttributes' ]
Sets the value of tplNonAttributes
tplNonAttributes : Object
Specifies the version of the application that last updated the PivotTable view. This attribute is application-dependent.
Defaults to: null
Sets the value of updatedVersion
updatedVersion : Number
Specifies a boolean value that indicates whether legacy auto formatting has been applied to the PivotTable view.
A value of 1 or true indicates that legacy auto formatting has been applied to the PivotTable.
A value of 0 or false indicates that legacy auto formatting has not been applied to the PivotTable.
Defaults to: true
Sets the value of useAutoFormatting
useAutoFormatting : Boolean
Specifies the name of the style to apply to the cells left blank when a PivotTable shrinks during a refresh operation
Defaults to: null
Possible values:
Use this config to set the pivot table layout
Defaults to: 'outline'
Sets the value of viewLayoutType
viewLayoutType : String
Specifies a boolean value that indicates whether totals should be based on visible data only. This attribute applies to OLAP PivotTables only.
A value of 1 or true indicates subtotals are computed on visible data only.
A value of 0 or false indicates subtotals are computed on all data.
Defaults to: null
Reference to the parent worksheet.
Defaults to: null
Sets the value of worksheet
worksheet : Ext.exporter.file.ooxml.excel.Worksheet
The value true
causes config
values to be stored on instances using a
property name prefixed with an underscore ("_") character. A value of false
stores config
values as properties using their exact name (no prefix).
Defaults to: true
Available since: 5.0.0
The value true
instructs the initConfig method to only honor values for
properties declared in the config
block of a class. When false
, properties
that are not declared in a config
block will be placed on the instance.
Defaults to: true
Available since: 5.0.0
Setting this property to false
will prevent nulling object references
on a Class instance after destruction. Setting this to "async"
will delay
the clearing for approx 50ms.
Defaults to: true
Available since: 6.2.0
Setting this property to true
will result in setting the object's
prototype to null
after the destruction sequence is fully completed.
After that, most attempts at calling methods on the object instance
will result in "method not defined" exception. This can be very helpful
with tracking down otherwise hard to find bugs like runaway Ajax requests,
timed functions not cleared on destruction, etc.
Note that this option can only work in browsers that support Object.setPrototypeOf
method, and is only available in debugging mode.
Defaults to: false
Available since: 6.2.0
Collect all files that are part of the final zip file
Defaults to: Ext.emptyFn
files : Object
Object key is the path to the file and object value is the content
This property is set to true
after the destroy method is called.
Defaults to: false
Set to true
if you want to generate an attributes
key on the template render data.
The value of this key is a concatenated string of pairs config_name=config_value
.
This means that each config that will participate in the attributes
has the same name
as the expected XML attribute. Changing the config name will have an impact on the XML
attribute.
In tplNonAttributes there is a list of configs that should not be part of attributes.
In tplAttributes define the configs that should be part of attributes.
If tplAttributes is empty then the all configs are used except for tplNonAttributes defined.
Defaults to: false
This property is set to true
during the call to initConfig.
Defaults to: false
Available since: 5.0.0
This property is set to true
if this instance is the first of its class.
Defaults to: false
Available since: 5.0.0
This value is true
and is used to identify plain objects from instances of
a defined class.
Defaults to: true
Get the reference to the current class from which this object was instantiated. Unlike Ext.Base#statics,
this.self
is scope-dependent and it's meant to be used for dynamic inheritance. See Ext.Base#statics
for a detailed comparison
Ext.define('My.Cat', {
statics: {
speciesName: 'Cat' // My.Cat.speciesName = 'Cat'
},
constructor: function() {
alert(this.self.speciesName); // dependent on 'this'
},
clone: function() {
return new this.self();
}
});
Ext.define('My.SnowLeopard', {
extend: 'My.Cat',
statics: {
speciesName: 'Snow Leopard' // My.SnowLeopard.speciesName = 'Snow Leopard'
}
});
var cat = new My.Cat(); // alerts 'Cat'
var snowLeopard = new My.SnowLeopard(); // alerts 'Snow Leopard'
var clone = snowLeopard.clone();
alert(Ext.getClassName(clone)); // alerts 'My.SnowLeopard'
Defaults to: Base
This method applies a versioned, deprecation declaration to this class. This
is typically called by the deprecated
config.
deprecations : Object
Call the original method that was previously overridden with Ext.Base#override
Ext.define('My.Cat', {
constructor: function() {
alert("I'm a cat!");
}
});
My.Cat.override({
constructor: function() {
alert("I'm going to be a cat!");
this.callOverridden();
alert("Meeeeoooowwww");
}
});
var kitty = new My.Cat(); // alerts "I'm going to be a cat!"
// alerts "I'm a cat!"
// alerts "Meeeeoooowwww"
args : Array / Arguments
The arguments, either an array or the arguments
object
from the current method, for example: this.callOverridden(arguments)
Returns the result of calling the overridden method
Deprecated since version 4.1.0
Use #callParent instead.
Call the "parent" method of the current method. That is the method previously overridden by derivation or by an override (see Ext#define).
Ext.define('My.Base', {
constructor: function (x) {
this.x = x;
},
statics: {
method: function (x) {
return x;
}
}
});
Ext.define('My.Derived', {
extend: 'My.Base',
constructor: function () {
this.callParent([21]);
}
});
var obj = new My.Derived();
alert(obj.x); // alerts 21
This can be used with an override as follows:
Ext.define('My.DerivedOverride', {
override: 'My.Derived',
constructor: function (x) {
this.callParent([x*2]); // calls original My.Derived constructor
}
});
var obj = new My.Derived();
alert(obj.x); // now alerts 42
This also works with static and private methods.
Ext.define('My.Derived2', {
extend: 'My.Base',
// privates: {
statics: {
method: function (x) {
return this.callParent([x*2]); // calls My.Base.method
}
}
});
alert(My.Base.method(10)); // alerts 10
alert(My.Derived2.method(10)); // alerts 20
Lastly, it also works with overridden static methods.
Ext.define('My.Derived2Override', {
override: 'My.Derived2',
// privates: {
statics: {
method: function (x) {
return this.callParent([x*2]); // calls My.Derived2.method
}
}
});
alert(My.Derived2.method(10); // now alerts 40
To override a method and replace it and also call the superclass method, use callSuper. This is often done to patch a method to fix a bug.
args : Array / Arguments
The arguments, either an array or the arguments
object
from the current method, for example: this.callParent(arguments)
Returns the result of calling the parent method
This method is used by an override to call the superclass method but bypass any overridden method. This is often done to "patch" a method that contains a bug but for whatever reason cannot be fixed directly.
Consider:
Ext.define('Ext.some.Class', {
method: function () {
console.log('Good');
}
});
Ext.define('Ext.some.DerivedClass', {
extend: 'Ext.some.Class',
method: function () {
console.log('Bad');
// ... logic but with a bug ...
this.callParent();
}
});
To patch the bug in Ext.some.DerivedClass.method
, the typical solution is to create an
override:
Ext.define('App.patches.DerivedClass', {
override: 'Ext.some.DerivedClass',
method: function () {
console.log('Fixed');
// ... logic but with bug fixed ...
this.callSuper();
}
});
The patch method cannot use callParent to call the superclass
method
since that would call the overridden method containing the bug. In
other words, the above patch would only produce "Fixed" then "Good" in the
console log, whereas, using callParent
would produce "Fixed" then "Bad"
then "Good".
args : Array / Arguments
The arguments, either an array or the arguments
object
from the current method, for example: this.callSuper(arguments)
Returns the result of calling the superclass method
This method could be used in config appliers that need to initialize a Collection that has items of type className.
data : Object
dataCollection : Object
className : Object
Create a new Collection with a decoder for the specified className.
className : Object
Builds a Collection decoder for the specified className.
klass : Object
Returns a collection item key
item : Object
Returns a specified config property value. If the name parameter is not passed, all current configuration options will be returned as key value pairs.
name : String (optional)
The name of the config property to get.
peek : Boolean (optional)
true
to peek at the raw value without calling the getter.
Defaults to: false
The config property value.
Returns the initial configuration passed to the constructor when instantiating this class.
Given this example Ext.button.Button definition and instance:
Ext.define('MyApp.view.Button', {
extend: 'Ext.button.Button',
xtype: 'mybutton',
scale: 'large',
enableToggle: true
});
var btn = Ext.create({
xtype: 'mybutton',
renderTo: Ext.getBody(),
text: 'Test Button'
});
Calling btn.getInitialConfig()
would return an object including the config
options passed to the create method:
xtype: 'mybutton',
renderTo: // The document body itself
text: 'Test Button'
Calling btn.getInitialConfig('text')
returns 'Test Button'.
name : String (optional)
Name of the config option to return.
The full config object or a single config value when name parameter specified.
Initialize configuration for this class. a typical example:
Ext.define('My.awesome.Class', {
// The default config
config: {
name: 'Awesome',
isAwesome: true
},
constructor: function(config) {
this.initConfig(config);
}
});
var awesome = new My.awesome.Class({
name: 'Super Awesome'
});
alert(awesome.getName()); // 'Super Awesome'
instanceConfig : Object
this
Adds a "destroyable" object to an internal list of objects that will be destroyed when this instance is destroyed (via destroy).
name : String
value : Object
The value
passed.
Sets a single/multiple configuration options.
name : String / Object
The name of the property to set, or a set of key value pairs to set.
value : Object (optional)
The value to set for the name parameter.
this
Get the reference to the class from which this object was instantiated. Note that unlike Ext.Base#self,
this.statics()
is scope-independent and it always returns the class from which it was called, regardless of what
this
points to during run-time
Ext.define('My.Cat', {
statics: {
totalCreated: 0,
speciesName: 'Cat' // My.Cat.speciesName = 'Cat'
},
constructor: function() {
var statics = this.statics();
alert(statics.speciesName); // always equals to 'Cat' no matter what 'this' refers to
// equivalent to: My.Cat.speciesName
alert(this.self.speciesName); // dependent on 'this'
statics.totalCreated++;
},
clone: function() {
var cloned = new this.self(); // dependent on 'this'
cloned.groupName = this.statics().speciesName; // equivalent to: My.Cat.speciesName
return cloned;
}
});
Ext.define('My.SnowLeopard', {
extend: 'My.Cat',
statics: {
speciesName: 'Snow Leopard' // My.SnowLeopard.speciesName = 'Snow Leopard'
},
constructor: function() {
this.callParent();
}
});
var cat = new My.Cat(); // alerts 'Cat', then alerts 'Cat'
var snowLeopard = new My.SnowLeopard(); // alerts 'Cat', then alerts 'Snow Leopard'
var clone = snowLeopard.clone();
alert(Ext.getClassName(clone)); // alerts 'My.SnowLeopard'
alert(clone.groupName); // alerts 'Cat'
alert(My.Cat.totalCreated); // alerts 3
Destroys a given set of linked objects. This is only needed if the linked object is being destroyed before this instance.
names : String[]
The names of the linked objects to destroy.
this
collection : Object
oldCollection : Object
Adds new config properties to this class. This is called for classes when they are declared, then for any mixins that class may define and finally for any overrides defined that target the class.
config : Object
mixinClass : Ext.Class (optional)
The mixin class if the configs are from a mixin.
Add methods / properties to the prototype of this class.
Ext.define('My.awesome.Cat', {
constructor: function() {
...
}
});
My.awesome.Cat.addMembers({
meow: function() {
alert('Meowww...');
}
});
var kitty = new My.awesome.Cat();
kitty.meow();
members : Object
The members to add to this class.
isStatic : Boolean (optional)
Pass true
if the members are static.
Defaults to: false
privacy : Boolean (optional)
Pass true
if the members are private. This
only has meaning in debug mode and only for methods.
Defaults to: false
Add / override static properties of this class.
Ext.define('My.cool.Class', {
...
});
My.cool.Class.addStatics({
someProperty: 'someValue', // My.cool.Class.someProperty = 'someValue'
method1: function() { ... }, // My.cool.Class.method1 = function() { ... };
method2: function() { ... } // My.cool.Class.method2 = function() { ... };
});
members : Object
this
Borrow another class' members to the prototype of this class.
Ext.define('Bank', {
money: '$$$',
printMoney: function() {
alert('$$$$$$$');
}
});
Ext.define('Thief', {
...
});
Thief.borrow(Bank, ['money', 'printMoney']);
var steve = new Thief();
alert(steve.money); // alerts '$$$'
steve.printMoney(); // alerts '$$$$$$$'
fromClass : Ext.Base
The class to borrow members from
members : Array / String
The names of the members to borrow
this
Create a new instance of this Class.
Ext.define('My.cool.Class', {
...
});
My.cool.Class.create({
someConfig: true
});
All parameters are passed to the constructor of the class.
the created instance.
Create aliases for existing prototype methods. Example:
Ext.define('My.cool.Class', {
method1: function() { ... },
method2: function() { ... }
});
var test = new My.cool.Class();
My.cool.Class.createAlias({
method3: 'method1',
method4: 'method2'
});
test.method3(); // test.method1()
My.cool.Class.createAlias('method5', 'method3');
test.method5(); // test.method3() -> test.method1()
alias : String / Object
The new method name, or an object to set multiple aliases. See flexSetter
origin : String / Object
The original method name
Returns the Ext.Configurator for this class.
Get the current class' name in string format.
Ext.define('My.cool.Class', {
constructor: function() {
alert(this.self.getName()); // alerts 'My.cool.Class'
}
});
My.cool.Class.getName(); // 'My.cool.Class'
className
Used internally by the mixins pre-processor
name : Object
mixinClass : Object
Override members of this class. Overridden methods can be invoked via Ext.Base#callParent.
Ext.define('My.Cat', {
constructor: function() {
alert("I'm a cat!");
}
});
My.Cat.override({
constructor: function() {
alert("I'm going to be a cat!");
this.callParent(arguments);
alert("Meeeeoooowwww");
}
});
var kitty = new My.Cat(); // alerts "I'm going to be a cat!"
// alerts "I'm a cat!"
// alerts "Meeeeoooowwww"
Direct use of this method should be rare. Use Ext.define instead:
Ext.define('My.CatOverride', {
override: 'My.Cat',
constructor: function() {
alert("I'm going to be a cat!");
this.callParent(arguments);
alert("Meeeeoooowwww");
}
});
The above accomplishes the same result but can be managed by the Ext.Loader which can properly order the override and its target class and the build process can determine whether the override is needed based on the required state of the target class (My.Cat).
members : Object
The properties to add to this class. This should be specified as an object literal containing one or more properties.
this class