/* This file is part of Ext JS 3.4 Copyright (c) 2011-2013 Sencha Inc Contact: http://www.sencha.com/contact GNU General Public License Usage This file may be used under the terms of the GNU General Public License version 3.0 as published by the Free Software Foundation and appearing in the file LICENSE included in the packaging of this file. Please review the following information to ensure the GNU General Public License version 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html. If you are unsure which license is appropriate for your use, please contact the sales department at http://www.sencha.com/contact. Build date: 2013-04-03 15:07:25 */ Ext.data.JsonP.Ext_grid_PropertyGrid({"alternateClassNames":[],"aliases":{},"enum":null,"parentMixins":[],"tagname":"class","subclasses":[],"extends":"Ext.grid.EditorGridPanel","uses":[],"html":"
Hierarchy
Files
A specialized grid implementation intended to mimic the traditional property grid as typically seen in\ndevelopment IDEs. Each row in the grid represents a property of some object, and the data is stored\nas a set of name/value pairs in Ext.grid.PropertyRecords. Example usage:
\n\nvar grid = new Ext.grid.PropertyGrid({\n title: 'Properties Grid',\n autoHeight: true,\n width: 300,\n renderTo: 'grid-ct',\n source: {\n \"(name)\": \"My Object\",\n \"Created\": new Date(Date.parse('10/15/2006')),\n \"Available\": false,\n \"Version\": .01,\n \"Description\": \"A test object\"\n }\n});\n
\n\nNote: this config is only used when this Component is rendered\nby a Container which has been configured to use an AnchorLayout (or subclass thereof).\nbased layout manager, for example:
layout: 'anchor' // or 'form', or 'absolute'
See Ext.layout.AnchorLayout.anchor also.
\n\ntrue
to animate the transition when the panel is collapsed, false
to skip the\nanimation (defaults to true
if the Ext.Fx class is available, otherwise false
).
True to automatically HTML encode and decode values pre and post edit (defaults to false)
\nDefaults to: false
The id of a column in\nthis grid that should expand to fill unused space. This value specified here can not\nbe 0.
\n\n\nNote: If the Grid's view is configured with\n\n\n
forceFit=true the autoExpandColumn\nis ignored. See Ext.grid.Column.width\nfor additional details.
\n\nSee autoExpandMax and autoExpandMin also.
\n\nDefaults to: false
The maximum width the autoExpandColumn\ncan have (if enabled). Defaults to 1000.
\nDefaults to: 1000
The minimum width the autoExpandColumn\ncan have (if enabled). Defaults to 50.
\nDefaults to: 50
true
to use height:'auto', false
to use fixed height (defaults to false
).\nNote: Setting autoHeight: true
means that the browser will manage the panel's height\nbased on its contents, and that Ext will not manage it at all. If the panel is within a layout that\nmanages dimensions (fit
, border
, etc.) then setting autoHeight: true
\ncan cause issues with scrolling and will not generally work as expected since the panel will take\non the height of its contents rather than the height required by the Ext layout.
Overrides: Ext.BoxComponent.autoHeight
True if the component should check for hidden classes (e.g. 'x-hidden' or 'x-hide-display') and remove\nthem on render (defaults to false).
\nDefaults to: false
The base CSS class to apply to this panel's element (defaults to 'x-panel'
).
Another option available by default is to specify 'x-plain'
which strips all styling\nexcept for required attributes for Ext layouts to function (e.g. overflow:hidden).\nSee unstyled
also.
Defaults to: 'x-panel'
The bottom toolbar of the panel. This can be a Ext.Toolbar object, a toolbar config, or an array of\nbuttons/button configs to be added to the toolbar. Note that this is not available as a property after render.\nTo access the bottom toolbar after render, use getBottomToolbar.
\n\n\nNote: Although a Toolbar may contain Field components, these will not be updated by a load\nof an ancestor FormPanel. A Panel's toolbars are not part of the standard Container->Component hierarchy, and\nso are not scanned to collect form items. However, the values will be submitted because form\nsubmission parameters are collected from the DOM tree.
\n\nA DomHelper element specification object may be specified for any\nPanel Element.
\n\n\nBy default, the Default element in the table below will be used for the html markup to\ncreate a child element with the commensurate Default class name (baseCls
will be\nreplaced by baseCls
):
Panel Default Default Custom Additional Additional\nElement element class element class style\n======== ========================== ========= ============== ===========\nheader div baseCls+'-header' headerCfg headerCssClass headerStyle\nbwrap div baseCls+'-bwrap' bwrapCfg bwrapCssClass bwrapStyle\n+ tbar div baseCls+'-tbar' tbarCfg tbarCssClass tbarStyle\n+ body div baseCls+'-body' bodyCfg bodyCssClass bodyStyle\n+ bbar div baseCls+'-bbar' bbarCfg bbarCssClass bbarStyle\n+ footer div baseCls+'-footer' footerCfg footerCssClass footerStyle\n\n\n\n
Configuring a Custom element may be used, for example, to force the body Element\nto use a different form of markup than is created by default. An example of this might be\nto create a child Panel containing a custom content, such as\na header, or forcing centering of all Panel content by having the body be a <center>\nelement:
\n\n\nnew Ext.Panel({\n title: 'Message Title',\n renderTo: Ext.getBody(),\n width: 200, height: 130,\n bodyCfg: {\n tag: 'center',\n cls: 'x-panel-body', // Default class not applied if Custom element specified\n html: 'Message'\n },\n footerCfg: {\n tag: 'h2',\n cls: 'x-panel-footer', // same as the Default class\n html: 'footer html'\n },\n footerCssClass: 'custom-footer', // additional css class, see addClass\n footerStyle: 'background-color:red' // see bodyStyle\n});\n
\n\n\nThe example above also explicitly creates a footer
with custom markup and\nstyling applied.
Additional css class selector to be applied to the body element in the format expected by\nExt.Element.addClass (defaults to null). See bodyCfg.
\nTrue to display the borders of the panel's body element, false to hide them (defaults to true). By default,\nthe border is a 2px wide inset border, but this can be further altered by setting bodyBorder to false.
\nThe maximum value in pixels which this BoxComponent will set its height to.
\n\n\nWarning: This will override any size management applied by layout managers.
\n\nThe maximum value in pixels which this BoxComponent will set its width to.
\n\n\nWarning: This will override any size management applied by layout managers.
\n\nThe minimum value in pixels which this BoxComponent will set its height to.
\n\n\nWarning: This will override any size management applied by layout managers.
\n\nThe minimum value in pixels which this BoxComponent will set its width to.
\n\n\nWarning: This will override any size management applied by layout managers.
\n\nAn array of events that, when fired, should be bubbled to any parent container.\nSee Ext.util.Observable.enableBubble.\nDefaults to [].\n\n
Defaults to: []
Overrides: Ext.Container.bubbleEvents
The CSS class used to to apply to the special clearing div rendered\ndirectly after each form field wrapper to provide field clearing (defaults to\n'x-form-clear-left').
\n\n\nNote: this config is only used when this Component is rendered by a Container\n\n\n
which has been configured to use the FormLayout layout\nmanager (e.g. Ext.form.FormPanel or specifying layout:'form') and either a\nfieldLabel is specified or isFormField=true is specified.
See Ext.layout.FormLayout.fieldTpl also.
\n\nThe number of clicks on a cell required to display the cell's editor (defaults to 2).
\n\n\nSetting this option to 'auto' means that mousedown on the selected cell starts\nediting that cell.
\n\nDefaults to: 1
Overrides: Ext.grid.EditorGridPanel.clicksToEdit
Panels themselves do not directly support being closed, but some Panel subclasses do (like\nExt.Window) or a Panel Class within an Ext.TabPanel. Specify true
\nto enable closing in such situations. Defaults to false
.
An optional extra CSS class that will be added to this component's Element (defaults to ''). This can be\nuseful for adding customized styles to the component or any of its children using standard CSS rules.
\ntrue
to make sure the collapse/expand toggle button always renders first (to the left of)\nany other tools in the panel's title bar, false
to render it last (defaults to true
).
Defaults to: true
true
to render the panel collapsed, false
to render it expanded (defaults to\nfalse
).
Defaults to: false
A CSS class to add to the panel's element after it has been collapsed (defaults to\n'x-panel-collapsed'
).
Defaults to: 'x-panel-collapsed'
True to make the panel collapsible and have the expand/collapse toggle button automatically rendered into\nthe header tool button area, false to keep the panel statically sized with no button (defaults to false).
\ntrue to add css for column separation lines.\nDefault is false.
\nDefaults to: false
An optional extra CSS class that will be added to this component's container. This can be useful for\nadding customized styles to the container or any of its children using standard CSS rules. See\nExt.layout.ContainerLayout.extraCls also.
\n\n\nNote: ctCls defaults to '' except for the following class\nwhich assigns a value by default:\n
ctCls: 'x-box-layout-ct custom-class'\n
\n\n\nAn object containing name/value pairs of custom editor type definitions that allow\nthe grid to support additional types of editable fields. By default, the grid supports strongly-typed editing\nof strings, dates, numbers and booleans using built-in form editors, but any custom type can be supported and\nassociated with a custom input control by specifying a custom editor. The name of the editor\ntype should correspond with the name of the property that will use the editor. Example usage:
\n\nvar grid = new Ext.grid.PropertyGrid({\n ...\n customEditors: {\n 'Start Time': new Ext.grid.GridEditor(new Ext.form.TimeField({selectOnFocus:true}))\n },\n source: {\n 'Start Time': '10:00 AM'\n }\n});\n
\n\nAn object containing name/value pairs of custom renderer type definitions that allow\nthe grid to support custom rendering of fields. By default, the grid supports strongly-typed rendering\nof strings, dates, numbers and booleans using built-in form editors, but any custom type can be supported and\nassociated with the type of the value. The name of the renderer type should correspond with the name of the property\nthat it will render. Example usage:
\n\nvar grid = new Ext.grid.PropertyGrid({\n ...\n customRenderers: {\n Available: function(v){\n if(v){\n return 'Yes';\n }else{\n return 'No';\n }\n }\n },\n source: {\n Available: true\n }\n});\n
\n\nThe DD group this GridPanel belongs to. Defaults to 'GridDD' if not specified.
\nConfigures the text in the drag proxy. Defaults to:
\n\nddText : '{0} selected row{1}'\n
\n\n\n{0} is replaced with the number of selected rows.
\nDefaults to: '{0} selected row{1}'
Defaults to true to enable deferred row rendering.
\n\n\nThis allows the GridPanel to be initially rendered empty, with the expensive update of the row\nstructure deferred so that layouts with GridPanels appear more quickly.
\n\nDefaults to: true
true to disable selections in the grid. Defaults to false.
\n\n\nIgnored if a SelectionModel is specified.
\n\nRender this panel disabled (default is false
). An important note when using the disabled\nconfig on panels is that IE will often fail to initialize the disabled mask element correectly if\nthe panel's layout has not yet completed by the time the Panel is disabled during the render process.\nIf you experience this issue, you may need to instead use the afterlayout event to initialize\nthe disabled state:
new Ext.Panel({\n ...\n listeners: {\n 'afterlayout': {\n fn: function(p){\n p.disable();\n },\n single: true // important, as many layouts can occur\n }\n }\n});\n
\n\nOverrides: Ext.Component.disabled
Defaults to false
. If using enableDragDrop with a CellSelectionModel,\nset this to true to have the view's dragZone's getDragData
\nmethod reference the selected cell using [rowIndex, cellIndex]
true
to enable dragging of this Panel (defaults to false
).
For custom drag/drop implementations, an Ext.Panel.DD config could also be passed\nin this config instead of true
. Ext.Panel.DD is an internal, undocumented class which\nmoves a proxy Element around in place of the Panel's element, but provides no other behaviour\nduring dragging or on drop. It is a subclass of Ext.dd.DragSource, so behaviour may be\nadded by implementing the interface methods of Ext.dd.DragDrop e.g.:\n
new Ext.Panel({\n title: 'Drag me',\n x: 100,\n y: 100,\n renderTo: Ext.getBody(),\n floating: true,\n frame: true,\n width: 400,\n height: 200,\n draggable: {\n// Config option of Ext.Panel.DD class.\n// It's a floating Panel, so do not show a placeholder proxy in the original position.\n insertProxy: false,\n\n// Called for each mousemove event while dragging the DD object.\n onDrag : function(e){\n// Record the x,y position of the drag proxy so that we can\n// position the Panel at end of drag.\n var pel = this.proxy.getEl();\n this.x = pel.getLeft(true);\n this.y = pel.getTop(true);\n\n// Keep the Shadow aligned if there is one.\n var s = this.panel.getEl().shadow;\n if (s) {\n s.realign(this.x, this.y, pel.getWidth(), pel.getHeight());\n }\n },\n\n// Called on the mouseup event.\n endDrag : function(e){\n this.panel.setPosition(this.x, this.y);\n }\n }\n}).show();\n
\n\nDefaults to true to enable hiding of columns\nwith the header menu.
\nDefaults to: true
private config overrides
\n\nDefaults to true to enable drag and drop reorder of columns. false\nto turn off column reordering via drag drop.
\nDefaults to: false
Overrides: Ext.grid.GridPanel.enableColumnMove
false to turn off column resizing for the whole grid. Defaults to true.
\nEnables dragging of the selected rows of the GridPanel. Defaults to false.
\n\n\nSetting this to true causes this GridPanel's GridView to\ncreate an instance of Ext.grid.GridDragZone. Note: this is available only after\nthe Grid has been rendered as the GridView's dragZone\nproperty.
\n\n\nA cooperating DropZone must be created who's implementations of\nonNodeEnter, onNodeOver,\nonNodeOut and onNodeDrop are able\nto process the data which is provided.
\n\nDefaults to: false
Defaults to true to enable the drop down button for menu in the headers.
\nDefaults to: false
Overrides: Ext.grid.GridPanel.enableHdMenu
A Toolbar object, a Toolbar config, or an array of\nButtons/Button configs, describing a Toolbar to be rendered into this Panel's footer element.
\n\n\nAfter render, the fbar
property will be an Toolbar instance.
If buttons
are specified, they will supersede the fbar
configuration property.
The Panel's buttonAlign
configuration affects the layout of these items, for example:
var w = new Ext.Window({\n height: 250,\n width: 500,\n bbar: new Ext.Toolbar({\n items: [{\n text: 'bbar Left'\n },'->',{\n text: 'bbar Right'\n }]\n }),\n buttonAlign: 'left', // anything but 'center' or 'right' and you can use '-', and '->'\n // to control the alignment of fbar items\n fbar: [{\n text: 'fbar Left'\n },'->',{\n text: 'fbar Right'\n }]\n}).show();\n
\n\n\nNote: Although a Toolbar may contain Field components, these will not be updated by a load\nof an ancestor FormPanel. A Panel's toolbars are not part of the standard Container->Component hierarchy, and\nso are not scanned to collect form items. However, the values will be submitted because form\nsubmission parameters are collected from the DOM tree.
\n\nThe label text to display next to this Component (defaults to '').
\n\n\nNote: this config is only used when this Component is rendered by a Container which\n\n\n
has been configured to use the FormLayout layout manager (e.g.\nExt.form.FormPanel or specifying layout:'form').
Also see hideLabel and\nExt.layout.FormLayout.fieldTpl.
\n\n\nExample use:
\n\nnew Ext.FormPanel({\n height: 100,\n renderTo: Ext.getBody(),\n items: [{\n xtype: 'textfield',\n fieldLabel: 'Name'\n }]\n});\n
\n\nNote: this config is only used when this Component is rendered\nby a Container which has been configured to use a BoxLayout.\nEach child Component with a flex
property will be flexed either vertically (by a VBoxLayout)\nor horizontally (by an HBoxLayout) according to the item's relative flex
value\ncompared to the sum of all Components with flex
value specified. Any child items that have\neither a flex = 0
or flex = undefined
will not be 'flexed' (the initial size will not be changed).\n\n
This property is used to configure the underlying Ext.Layer. Acceptable values for this\nconfiguration property are:
\n\n\nfalse
: Default.true
: myPanel.setPosition(100,100);
).object
: If true the container will force a layout initially even if hidden or collapsed. This option\nis useful for forcing forms to render in collapsed or hidden containers. (defaults to false).
\nDefaults to: false
True to force validation even if the value is unmodified (defaults to false)
\nDefaults to: false
false
by default to render with plain 1px square borders. true
to render with\n9 elements, complete with custom rounded corners (also see Ext.Element.boxWrap).
The template generated for each condition is depicted below:
\n\n\n\n// frame = false\n<div id=\"developer-specified-id-goes-here\" class=\"x-panel\">\n\n <div class=\"x-panel-header\"><span class=\"x-panel-header-text\">Title: (frame:false)</span></div>\n\n <div class=\"x-panel-bwrap\">\n <div class=\"x-panel-body\"><p>html value goes here</p></div>\n </div>\n</div>\n\n// frame = true (create 9 elements)\n<div id=\"developer-specified-id-goes-here\" class=\"x-panel\">\n <div class=\"x-panel-tl\"><div class=\"x-panel-tr\"><div class=\"x-panel-tc\">\n <div class=\"x-panel-header\"><span class=\"x-panel-header-text\">Title: (frame:true)</span></div>\n </div></div></div>\n\n <div class=\"x-panel-bwrap\">\n <div class=\"x-panel-ml\"><div class=\"x-panel-mr\"><div class=\"x-panel-mc\">\n <div class=\"x-panel-body\"><p>html value goes here</p></div>\n </div></div></div>\n\n <div class=\"x-panel-bl\"><div class=\"x-panel-br\"><div class=\"x-panel-bc\"/>\n </div></div></div>\n</div>\n
\n\nThe height of this component in pixels (defaults to auto).\nNote to express this dimension as a percentage or offset see Ext.Component.anchor.
\ntrue
to hide the expand/collapse toggle button when collapsible == true
,\nfalse
to display it (defaults to false
).
true
to hide the expand/collapse toggle button when collapsible == true
,\nfalse
to display it (defaults to false
).
True to hide the grid's header. Defaults to false
.
true to completely hide the label element\n(label and separator). Defaults to false.\nBy default, even if you do not specify a fieldLabel the space will still be\nreserved so that the field will line up with other fields that do have labels.\nSetting this to true will cause the field to not reserve that space.
\n\n\nNote: see the note for clearCls.
Example use:
\n\nnew Ext.FormPanel({\n height: 100,\n renderTo: Ext.getBody(),\n items: [{\n xtype: 'textfield'\n hideLabel: true\n }]\n});\n
\n\nHow this component should be hidden. Supported values are 'visibility'\n(css visibility), 'offsets' (negative offset position) and 'display'\n(css display).
\n\n\nNote: the default of 'display' is generally preferred\n\n\n
since items are automatically laid out when they are first shown (no sizing\nis done while hidden).
\nDefaults to: 'display'
True to hide and show the component's container when hide/show is called on the component, false to hide\nand show the component itself (defaults to false). For example, this can be used as a shortcut for a hide\nbutton on a window by setting hide:true on the button when adding it to its parent container.
\nDefaults to: false
The CSS class selector that specifies a background image to be used as the header icon (defaults to '').
\n\nAn example of specifying a custom icon class would be something like:\n
\n\n\n// specify the property in the config for the class:\n ...\n iconCls: 'my-icon'\n\n// css class that specifies background image to be used as the icon image:\n.my-icon { background-image: url(../images/my-icon.gif) 0 6px no-repeat !important; }\n
\n\nThe unique id of this component (defaults to an auto-assigned id).\nYou should assign an id if you need to be able to access the component later and you do\nnot have an object reference available (e.g., using Ext.getCmp).
\n\n\nNote that this id will also be used as the element id for the containing HTML element\nthat is rendered to the page for this component. This allows you to write id-based CSS\nrules to style the specific instance of this component uniquely, and also to select\nsub-elements using this component's id as the parent.
\n\n\nNote: to avoid complications imposed by a unique id also see\nitemId
and ref
.
Note: to access the container of an item see ownerCt
.
Note: this config is only used when this Component is rendered by a Container which\nhas been configured to use the FormLayout layout manager (e.g.\nExt.form.FormPanel or specifying layout:'form').
\n\n\nAn additional CSS class to apply to the div wrapping the form item\nelement of this field. If supplied, itemCls at the field level will override\nthe default itemCls supplied at the container level. The value specified for\nitemCls will be added to the default class ('x-form-item').
\n\n\nSince it is applied to the item wrapper (see\nExt.layout.FormLayout.fieldTpl), it allows\nyou to write standard CSS rules that can apply to the field, the label (if specified), or\nany other element within the markup for the field.
\n\n\nNote: see the note for fieldLabel.
Example use:
\n\n// Apply a style to the field's label:\n<style>\n .required .x-form-item-label {font-weight:bold;color:red;}\n</style>\n\nnew Ext.FormPanel({\n height: 100,\n renderTo: Ext.getBody(),\n items: [{\n xtype: 'textfield',\n fieldLabel: 'Name',\n itemCls: 'required' //this label will be styled\n },{\n xtype: 'textfield',\n fieldLabel: 'Favorite Color'\n }]\n});\n
\n\nAn itemId can be used as an alternative way to get a reference to a component\nwhen no object reference is available. Instead of using an id
with\nExt.getCmp, use itemId
with\nExt.Container.getComponent which will retrieve\nitemId
's or id's. Since itemId
's are an index to the\ncontainer's internal MixedCollection, the itemId
is scoped locally to the container --\navoiding potential conflicts with Ext.ComponentMgr which requires a unique\nid
.
var c = new Ext.Panel({ //\n height: 300,\n renderTo: document.body,\n layout: 'auto',\n items: [\n {\n itemId: 'p1',\n title: 'Panel 1',\n height: 150\n },\n {\n itemId: 'p2',\n title: 'Panel 2',\n height: 150\n }\n ]\n})\np1 = c.getComponent('p1'); // not the same as Ext.getCmp()\np2 = p1.ownerCt.getComponent('p2'); // reference via a sibling\n
\n\n\n\n\n\nNote: to access the container of an item see ownerCt.
\n\nA Ext.KeyMap config object (in the format expected by Ext.KeyMap.addBinding\nused to assign custom key handling to this panel (defaults to null
).
The separator to display after the text of each\nfieldLabel. This property may be configured at various levels.\nThe order of precedence is:\n
Note: see the note for clearCls.
Also see hideLabel and\nExt.layout.FormLayout.fieldTpl.
\n\n\nExample use:
\n\nnew Ext.FormPanel({\n height: 100,\n renderTo: Ext.getBody(),\n layoutConfig: {\n labelSeparator: '~' // layout config has lowest priority (defaults to ':')\n },\n labelSeparator: '>>', // config at container level\n items: [{\n xtype: 'textfield',\n fieldLabel: 'Field 1',\n labelSeparator: '...' // field/component level config supersedes others\n },{\n xtype: 'textfield',\n fieldLabel: 'Field 2' // labelSeparator will be '='\n }]\n});\n
\n\nA CSS style specification string to apply directly to this field's\nlabel. Defaults to the container's labelStyle value if set (e.g.,\nExt.layout.FormLayout.labelStyle , or '').
\n\n\nNote: see the note for clearCls
.
Also see hideLabel
and\nExt.layout.FormLayout.fieldTpl.
Example use:
\n\nnew Ext.FormPanel({\n height: 100,\n renderTo: Ext.getBody(),\n items: [{\n xtype: 'textfield',\n fieldLabel: 'Name',\n labelStyle: 'font-weight:bold;'\n }]\n});\n
\n\n(optional)
A config object containing one or more event handlers to be added to this\nobject during initialization. This should be a valid listeners config object as specified in the\naddListener example for attaching multiple handlers at once.
\n\nDOM events from ExtJs Components
\n\n\nWhile some ExtJs Component classes export selected DOM events (e.g. \"click\", \"mouseover\" etc), this\n\n\n
is usually only done when extra value can be added. For example the DataView's\nclick
event passing the node clicked on. To access DOM\nevents directly from a Component's HTMLElement, listeners must be added to the Element after the Component\nhas been rendered. A plugin can simplify this step:
// Plugin is configured with a listeners config object.\n// The Component is appended to the argument list of all handler functions.\nExt.DomObserver = Ext.extend(Object, {\n constructor: function(config) {\n this.listeners = config.listeners ? config.listeners : config;\n },\n\n // Component passes itself into plugin's init method\n init: function(c) {\n var p, l = this.listeners;\n for (p in l) {\n if (Ext.isFunction(l[p])) {\n l[p] = this.createHandler(l[p], c);\n } else {\n l[p].fn = this.createHandler(l[p].fn, c);\n }\n }\n\n // Add the listeners to the Element immediately following the render call\n c.render = c.render.createSequence(function() {\n var e = c.getEl();\n if (e) {\n e.on(l);\n }\n });\n },\n\n createHandler: function(fn, c) {\n return function(e) {\n fn.call(this, e, c);\n };\n }\n});\n\nvar combo = new Ext.form.ComboBox({\n\n // Collapse combo when its element is clicked on\n plugins: [ new Ext.DomObserver({\n click: function(evt, comp) {\n comp.collapse();\n }\n })],\n store: myStore,\n typeAhead: true,\n mode: 'local',\n triggerAction: 'all'\n});\n
\n\n\n\nAn Ext.LoadMask config or true to mask the grid while\nloading. Defaults to false
.
Defaults to: false
Note: this config is only used when this BoxComponent is rendered\nby a Container which has been configured to use the BorderLayout\nor one of the two BoxLayout subclasses.
\n\n\nAn object containing margins to apply to this BoxComponent in the\nformat:
\n\n\n{\n top: (top margin),\n right: (right margin),\n bottom: (bottom margin),\n left: (left margin)\n}
\n\n\nMay also be a string containing space-separated, numeric margin values. The order of the\nsides associated with each value matches the way CSS processes margin values:
\n\n\nDefaults to:
\n\n\n{top:0, right:0, bottom:0, left:0}\n
\n\ntrue
to mask the panel when it is disabled, false
to not mask it (defaults\nto true
). Either way, the panel will always tell its contained elements to disable themselves\nwhen it is disabled, but masking the panel can provide an additional visual cue that the panel is\ndisabled.
Defaults to: true
Sets the maximum height of the grid - ignored if autoHeight is not on.
\nSets the maximum height of the grid - ignored if autoHeight is not on.
\nMinimum width in pixels of all buttons in this panel (defaults to 75
)
Defaults to: 75
The minimum width a column can be resized to. Defaults to 25.
\nDefaults to: 25
An optional extra CSS class that will be added to this component's Element when the mouse moves\nover the Element, and removed when the mouse moves out. (defaults to ''). This can be\nuseful for adding customized 'active' or 'hover' styles to the component or any of its children using standard CSS rules.
\nA shortcut for setting a padding style on the body element. The value can either be\na number to be applied to all sides, or a normal css string describing padding.\nDefaults to undefined.
\nThe page level x coordinate for this component if contained within a positioning container.
\nThe page level x coordinate for this component if contained within a positioning container.
\nThe page level y coordinate for this component if contained within a positioning container.
\nThe page level y coordinate for this component if contained within a positioning container.
\nAn object or array of objects that will provide custom functionality for this component. The only\nrequirement for a valid plugin is that it contain an init method that accepts a reference of type Ext.Component.\nWhen a component is created, if any plugins are available, the component will call the init method on each\nplugin, passing a reference to itself. Each plugin can then call methods or respond to events on the\ncomponent as needed to provide its functionality.
\nAn object containing property name/display name pairs.\nIf specified, the display name will be shown in the name column instead of the property name.
\nThe registered ptype to create. This config option is not used when passing\na config object into a constructor. This config option is used only when\nlazy instantiation is being used, and a Plugin is being\nspecified not as a fully instantiated Component, but as a Component config\nobject. The ptype will be looked up at render time up to determine what\ntype of Plugin to create.
\nIf you create your own Plugins, you may register them using\nExt.ComponentMgr.registerPlugin in order to be able to\ntake advantage of lazy instantiation and rendering.
A path specification, relative to the Component's ownerCt
\nspecifying into which ancestor Container to place a named reference to this Component.
The ancestor axis can be traversed by using '/' characters in the path.\nFor example, to put a reference to a Toolbar Button into the Panel which owns the Toolbar:
\n\n\nvar myGrid = new Ext.grid.EditorGridPanel({\n title: 'My EditorGridPanel',\n store: myStore,\n colModel: myColModel,\n tbar: [{\n text: 'Save',\n handler: saveChanges,\n disabled: true,\n ref: '../saveButton'\n }],\n listeners: {\n afteredit: function() {\n// The button reference is in the GridPanel\n myGrid.saveButton.enable();\n }\n }\n});\n
\n\n\nIn the code above, if the ref
had been 'saveButton'
\nthe reference would have been placed into the Toolbar. Each '/' in the ref
\nmoves up one level from the Component's ownerCt
.
Note: this config is only used when this BoxComponent is rendered\nby a Container which has been configured to use the BorderLayout\nlayout manager (e.g. specifying layout:'border').
\n\n\nSee Ext.layout.BorderLayout also.
\n\nSpecify the id of the element, a DOM element or an existing Element that this component\nwill be rendered into.
\n\n\nSee render also.
\n\nThe event to listen to for resizing in layouts. Defaults to 'bodyresize'.
\nDefaults to: 'bodyresize'
Overrides: Ext.Container.resizeEvent
Any subclass of AbstractSelectionModel that will provide the selection model for\nthe grid (defaults to Ext.grid.CellSelectionModel if not specified).
\nOverrides: Ext.grid.GridPanel.selModel
true
(or a valid Ext.Shadow Ext.Shadow.mode value) to display a shadow behind the\npanel, false
to display no shadow (defaults to 'sides'
). Note that this option\nonly applies when floating = true
.
The number of pixels to offset the shadow if displayed (defaults to 4
). Note that this\noption only applies when floating = true
.
false
to disable the iframe shim in browsers which need one (defaults to true
).\nNote that this option only applies when floating = true
.
An array of events that, when fired, should trigger this component to save its state.\nDefaults to:
\n\nstateEvents: ['columnmove', 'columnresize', 'sortchange', 'groupchange']\n
\n\n\nThese can be any types of events supported by this component, including browser or\ncustom events (e.g., ['click', 'customerchange']).
\n\n\nSee Ext.Component.stateful for an explanation of saving and restoring\nComponent state.
\n\nDefaults to: ['columnmove', 'columnresize', 'sortchange', 'groupchange']
Overrides: Ext.Component.stateEvents
The unique id for this component to use for state management purposes\n(defaults to the component id if one was set, otherwise null if the\ncomponent is using a generated id).
\n\nSee stateful
for an explanation of saving and\nrestoring Component state.
A flag which causes the Component to attempt to restore the state of\ninternal properties from a saved state on startup. The component must have\neither a stateId
or id
assigned\nfor state to be managed. Auto-generated ids are not guaranteed to be stable\nacross page loads and cannot be relied upon to save and restore the same\nstate for a component.
\n
For state saving to work, the state manager's provider must have been\nset to an implementation of Ext.state.Provider which overrides the\nset and get\nmethods to save and recall name/value pairs. A built-in implementation,\nExt.state.CookieProvider is available.
\nTo set the state provider for the current page:
\nExt.state.Manager.setProvider(new Ext.state.CookieProvider({\n expires: new Date(new Date().getTime()+(1000*60*60*24*7)), //7 days from now\n}));\n
\nA stateful Component attempts to save state when one of the events\nlisted in the stateEvents
configuration fires.
To save state, a stateful Component first serializes its state by\ncalling getState
. By default, this function does\nnothing. The developer must provide an implementation which returns an\nobject hash which represents the Component's restorable state.
The value yielded by getState is passed to Ext.state.Manager.set\nwhich uses the configured Ext.state.Provider to save the object\nkeyed by the Component's stateId
, or, if that is not\nspecified, its id
.
During construction, a stateful Component attempts to restore\nits state by calling Ext.state.Manager.get passing the\nstateId
, or, if that is not specified, the\nid
.
The resulting object is passed to applyState
.\nThe default implementation of applyState
simply copies\nproperties into the object, but a developer may override this to support\nmore behaviour.
You can perform extra processing on state save and restore by attaching\nhandlers to the beforestaterestore, staterestore,\nbeforestatesave and statesave events.
\n\ntrue to stripe the rows. Default is false.
\n\nThis causes the CSS class x-grid3-row-alt to be added to alternate rows of\nthe grid. A default CSS rule is provided which sets a background colour, but you can override this\nwith a rule which either overrides the background-color style using the '!important'\nmodifier, or which uses a CSS selector of higher specificity.
\n\nDefaults to: false
Overrides: Ext.grid.GridPanel.stripeRows
A custom style specification to be applied to this component's Element. Should be a valid argument to\nExt.Element.applyStyles.
\n\nnew Ext.Panel({\n title: 'Some Title',\n renderTo: Ext.getBody(),\n width: 400, height: 300,\n layout: 'form',\n items: [{\n xtype: 'textarea',\n style: {\n width: '95%',\n marginBottom: '10px'\n }\n },\n new Ext.Button({\n text: 'Send',\n minWidth: '100',\n style: {\n marginBottom: '10px'\n }\n })\n ]\n});\n
\n\nNote: this config is only used when this BoxComponent is a child item of a TabPanel.
\n\n\nA string to be used as innerHTML (html tags are accepted) to show in a tooltip when mousing over\nthe associated tab selector element. Ext.QuickTips.init()\nmust be called in order for the tips to render.
\nThe top toolbar of the panel. This can be a Ext.Toolbar object, a toolbar config, or an array of\nbuttons/button configs to be added to the toolbar. Note that this is not available as a property after render.\nTo access the top toolbar after render, use getTopToolbar.
\n\n\nNote: Although a Toolbar may contain Field components, these will not be updated by a load\nof an ancestor FormPanel. A Panel's toolbars are not part of the standard Container->Component hierarchy, and\nso are not scanned to collect form items. However, the values will be submitted because form\nsubmission parameters are collected from the DOM tree.
\n\nThe title text to be used as innerHTML (html tags are accepted) to display in the panel\nheader
(defaults to ''). When a title
is specified the\nheader
element will automatically be created and displayed unless\nheader is explicitly set to false
. If you do not want to specify a\ntitle
at config time, but you may want one later, you must either specify a non-empty\ntitle
(a blank space ' ' will do) or header:true
so that the container\nelement will get created.
true
to allow expanding and collapsing the panel (when collapsible = true
)\nby clicking anywhere in the header bar, false
) to allow it only by clicking to tool button\n(defaults to false
)). If this panel is a child item of a border layout also see the\nBorderLayout.Region\nfloatable
config option.
A Template used to create tools in the header Element. Defaults to:
\n\n\nnew Ext.Template('<div class=\"x-tool x-tool-{id}\"> </div>')
\n\n\nThis may may be overridden to provide a custom DOM structure for tools based upon a more\ncomplex XTemplate. The template's data is a single tool configuration object (Not the entire Array)\nas specified in tools. In the following example an <a> tag is used to provide a\nvisual indication when hovering over the tool:
\n\n\nvar win = new Ext.Window({\n tools: [{\n id: 'download',\n href: '/MyPdfDoc.pdf'\n }],\n toolTemplate: new Ext.XTemplate(\n '<tpl if=\"id==\\'download\\'\">',\n '<a class=\"x-tool x-tool-pdf\" href=\"{href}\"></a>',\n '</tpl>',\n '<tpl if=\"id!=\\'download\\'\">',\n '<div class=\"x-tool x-tool-{id}\"> </div>',\n '</tpl>'\n ),\n width:500,\n height:300,\n closeAction:'hide'\n});
\n\n\nNote that the CSS class 'x-tool-pdf' should have an associated style rule which provides an\nappropriate background image, something like:
\n\n\n\n\n a.x-tool-pdf {background-image: url(../shared/extjs/images/pdf.gif)!important;}\n
\n\nAn array of tool button configs to be added to the header tool area. When rendered, each tool is\nstored as an Element referenced by a public property called tools.<tool-type>
Each tool config may contain the following properties:\n
x-tool-<tool-type>
to the\nresulting tool Element. Ext provides CSS rules, and an icon sprite containing images for the tool types listed below.\nThe developer may implement custom tools by supplying alternate CSS rules and background images:\n close
minimize
maximize
restore
gear
pin
unpin
right
left
up
down
refresh
minus
plus
help
search
save
print
Note that, apart from the toggle tool which is provided when a panel is collapsible, these\ntools only provide the visual button. Any required functionality must be provided by adding\nhandlers that implement the necessary behavior.
\nExample usage:
\ntools:[{\n id:'refresh',\n qtip: 'Refresh form Data',\n // hidden:true,\n handler: function(event, toolEl, panel){\n // refresh logic\n }\n},\n{\n id:'help',\n qtip: 'Get Help',\n handler: function(event, toolEl, panel){\n // whatever\n }\n}]\n
\nFor the custom id of 'help'
define two relevant css classes with a link to\na 15x15 image:
.x-tool-help {background-image: url(images/help.png);}\n.x-tool-help-over {background-image: url(images/help_over.png);}\n// if using an image sprite:\n.x-tool-help {background-image: url(images/help.png) no-repeat 0 0;}\n.x-tool-help-over {background-position:-15px 0;}\n
\n\nAn data
and\ntplWriteMode
configurations.
The Ext.(X)Template method to use when\nupdating the content area of the Component. Defaults to 'overwrite'\n(see Ext.XTemplate.overwrite
).
Defaults to: 'overwrite'
True to highlight rows when the mouse is over. Default is true\nfor GridPanel, but false for EditorGridPanel.
\nDefaults to: false
Overrides: Ext.grid.EditorGridPanel.trackMouseOver
The Ext.grid.GridView used by the grid. This can be set\nbefore a call to render().
\nA config object that will be applied to the grid's UI view. Any of\nthe config options available for Ext.grid.GridView can be specified here. This option\nis ignored if view is specified.
\nDefaults to: {forceFit: true}
Overrides: Ext.grid.GridPanel.viewConfig
The width of this component in pixels (defaults to auto).\nNote to express this dimension as a percentage or offset see Ext.Component.anchor.
\nThe local x (left) coordinate for this component if contained within a positioning container.
\nThe local x (left) coordinate for this component if contained within a positioning container.
\nThe registered xtype to create. This config option is not used when passing\na config object into a constructor. This config option is used only when\nlazy instantiation is being used, and a child item of a Container is being\nspecified not as a fully instantiated Component, but as a Component config\nobject. The xtype will be looked up at render time up to determine what\ntype of child Component to create.
\nThe predefined xtypes are listed here.
If you subclass Components to create your own Components, you may register\nthem using Ext.ComponentMgr.registerType in order to be able to\ntake advantage of lazy instantiation and rendering.
\nThe Panel's body Element which may be used to contain HTML content.\nThe content may be specified in the html config, or it may be loaded using the\nautoLoad config, or through the Panel's Updater. Read-only.
\n\nIf this is used to load visible HTML elements in either way, then\nthe Panel may not be used as a Layout for hosting nested Panels.
\n\n\nIf this Panel is intended to be used as the host of a Layout (See layout\nthen the body Element must not be loaded or changed - it is under the control\nof the Panel's Layout.\n
Note: see the Note for el
also.
private, set in afterRender to signify that the component has been rendered
\nDefaults to: false
True if this panel is collapsed. Read-only.
\nIf this Panel is configured draggable, this property will contain\nan instance of Ext.dd.DragSource which handles dragging the Panel.
\n\n\nThe developer must provide implementations of the abstract methods of Ext.dd.DragSource\nin order to supply behaviour for each stage of the drag/drop process. See draggable.
\nprivate, notify box this class will handle heights
\nDefaults to: true
Overrides: Ext.BoxComponent.deferHeight
The Ext.Element which encapsulates this Component. Read-only.
\n\n\nThis will usually be a <DIV> element created by the class's onRender method, but\nthat may be overridden using the autoEl
config.
Note: this element will not be available until this Component has been rendered.
To add listeners for DOM events to this Component (as opposed to listeners\nfor this Component's own Observable events), see the listeners\nconfig for a suggestion, or use a render listener directly:
\n\n\nnew Ext.Panel({\n title: 'The Clickable Panel',\n listeners: {\n render: function(p) {\n // Append the Panel to the click handler's argument list.\n p.getEl().on('click', handlePanelClick.createDelegate(null, [p], true));\n },\n single: true // Remove the listener after first invocation\n }\n});\n
\n\n\nSee also getEl
\n\nThis Component's initial configuration specification. Read-only.
\nThe ancestor Container into which the ref reference was inserted if this Component\nis a child of a Container, and has been configured with a ref
.
private
\n\nTrue if this component has been rendered. Read-only.
\nDefaults to: false
Overrides: Ext.Component.rendered
protected - these could be used to customize the behavior of the window,\nbut changing them would not be useful without further mofifications and\ncould lead to unexpected or undesirable results.
\nDefaults to: 'header'
The grid config object
\nOverrides: Ext.grid.EditorGridPanel.constructor
Adds a button to this panel. Note that this method must be called prior to rendering. The preferred\napproach is to add buttons via the buttons config.
\nA valid Ext.Button config. A string will become the text for a default\nbutton config, an object will be treated as a button config object.
\nThe function to be called on button Ext.Button.click
\nThe scope (this
reference) in which the button handler function is executed. Defaults to the Button.
The button that was added
\nAdds a CSS class to the component's underlying element.
\nThe CSS class name to add
\nthis
\nAdds the specified events to the list of events which this Observable may fire.
\nEither an object with event names as properties with a value of true
\nor the first event name string if multiple event names are being passed as separate parameters.
. Event name if multiple event names are being passed as separate parameters.\nUsage:
\n\nthis.addEvents('storeloaded', 'storecleared');\n
\n\nAppends an event handler to this object.
\nThe name of the event to listen for.
\nThe method the event invokes.
\nThe scope (this
reference) in which the handler function is executed.\nIf omitted, defaults to the object which fired the event.
An object containing handler configuration.\nproperties. This may contain any of the following properties:
this
reference) in which the handler function is executed.\nIf omitted, defaults to the object which fired the event.\nCombining Options
\nUsing the options argument, it is possible to combine different types of listeners:
\n
\nA delayed, one-time listener.\n
myDataView.on('click', this.onClick, this, {\nsingle: true,\ndelay: 100\n});
\n\nAttaching multiple handlers in 1 call
\nThe method also allows for a single argument to be passed which is a config object containing properties\nwhich specify multiple handlers.\n
\n
myGridPanel.on({\n'click' : {\n fn: this.onClick,\n scope: this,\n delay: 100\n},\n'mouseover' : {\n fn: this.onMouseOver,\n scope: this\n},\n'mouseout' : {\n fn: this.onMouseOut,\n scope: this\n}\n});
\n\nOr a shorthand syntax:
\n
myGridPanel.on({\n'click' : this.onClick,\n'mouseover' : this.onMouseOver,\n'mouseout' : this.onMouseOut,\n scope: this\n});
\n\nBubbles up the component/container heirarchy, calling the specified function with each component. The scope (this) of\nfunction call will be the scope provided or the current component. The arguments to the function\nwill be the args provided or the current component. If the function returns false at any point,\nthe bubble is stopped.
\nThe function to call
\nThe scope of the function (defaults to current node)
\nThe args to call the function with (default to passing the current component)
\nthis
\nWe can only lay out if there is a view area in which to layout.\ndisplay:none on the layout target, or any of its parent elements will mean it has no view area.
\nClone the current component using the original config values passed into this instance by default.
\nA new config containing any properties to override in the cloned version.\nAn id property can be passed on this object, otherwise one will be generated to avoid duplicates.
\nclone The cloned copy of this component
\nCollapses the panel body so that it becomes hidden. Fires the beforecollapse event which will\ncancel the collapse action if it returns false.
\nTrue to animate the transition, else false (defaults to the value of the\nanimCollapse panel config)
\nthis
\nprivate
\nprivate - wraps up an animation param with internal callbacks
\nprivate
\nprivate
\nDestroys this component by purging any event listeners, removing the component's element from the DOM,\nremoving the component from its Ext.Container (if applicable) and unregistering it from\nExt.ComponentMgr. Destruction is generally handled automatically by the framework and this method\nshould usually not need to be called directly.
\nEnables events fired by this Observable to bubble up an owner hierarchy by calling\nthis.getBubbleTarget()
if present. There is no implementation in the Observable base class.
This is commonly used by Ext.Components to bubble events to owner Containers. See Ext.Component.getBubbleTarget. The default\nimplementation in Ext.Component returns the Component's immediate owner. But if a known target is required, this can be overridden to\naccess the required target more quickly.
\n\n\nExample:
\n\n\nExt.override(Ext.form.Field, {\n // Add functionality to Field's initComponent to enable the change event to bubble\n initComponent : Ext.form.Field.prototype.initComponent.createSequence(function() {\n this.enableBubble('change');\n }),\n\n // We know that we want Field's events to bubble directly to the FormPanel.\n getBubbleTarget : function() {\n if (!this.formPanel) {\n this.formPanel = this.findParentByType('form');\n }\n return this.formPanel;\n }\n});\n\nvar myForm = new Ext.formPanel({\n title: 'User Details',\n items: [{\n ...\n }],\n listeners: {\n change: function() {\n // Title goes red if form has been modified.\n myForm.header.setStyle('color', 'red');\n }\n }\n});\n
\n\nExpands the panel body so that it becomes visible. Fires the beforeexpand event which will\ncancel the expand action if it returns false.
\nTrue to animate the transition, else false (defaults to the value of the\nanimCollapse panel config)
\nthis
\nFind a container above this component at any level by a custom function. If the passed function returns\ntrue, the container will be returned.
\nThe custom function to call with the arguments (container, this component).
\nThe first Container for which the custom function returns true
\nFind a container above this component at any level by xtype or class
\nThe xtype to check for this Component. Note that the the component can either be an instance\nor a component class:
\nFalse to check whether this Component is descended from the xtype (this is\nthe default), or true to check whether this Component is directly of the specified xtype.
\nThe first Container which matches the given xtype or class
\nFires the specified event with the passed parameters (minus the event name).
\n\n\nAn event may be set to bubble up an Observable parent hierarchy (See Ext.Component.getBubbleTarget)\nby calling enableBubble.
\n\nThe name of the event to fire.
\nVariable number of parameters are passed to handlers.
\nreturns false if any of the handlers return false otherwise it returns true.
\nTry to focus this component.
\nIf applicable, true to also select the text in this component
\nDelay the focus this number of milliseconds (true for 10 milliseconds)
\nthis
\nGet a component contained by this container (alias for items.get(key))
\nThis method has been deprecated
\nShould be removed in 4.0, since getComponent does the same thing.
\n\nGets the current box measurements of the component's underlying element.
\nIf true the element's left and top are returned instead of page XY (defaults to false)
\nbox An object in the format {x, y, width, height}
\nProvides the link for Observable's fireEvent method to bubble up the ownership hierarchy.
\nthe Container which owns this Component.
\nprivate - used as the key lookup function for the items collection
\nReturns the Ext.Element which encapsulates this Component.
\n\n\nThis will usually be a <DIV> element created by the class's onRender method, but\nthat may be overridden using the autoEl config.
\n\n\nNote: this element will not be available until this Component has been rendered.
To add listeners for DOM events to this Component (as opposed to listeners\nfor this Component's own Observable events), see the listeners config for a suggestion,\nor use a render listener directly:
\n\n\nnew Ext.Panel({\n title: 'The Clickable Panel',\n listeners: {\n render: function(p) {\n // Append the Panel to the click handler's argument list.\n p.getEl().on('click', handlePanelClick.createDelegate(null, [p], true));\n },\n single: true // Remove the listener after first invocation\n }\n});\n
\n\nThe Element which encapsulates this Component.
\nReturns the height in pixels of the framing elements of this panel (including any top and bottom bars and\nheader and footer elements, but not including the body height). To retrieve the body height see getInnerHeight.
\nThe frame height
\nReturns the width in pixels of the framing elements of this panel (not including the body width). To\nretrieve the body width see getInnerWidth.
\nThe frame width
\nReturns the grid's underlying element.
\nThe element
\nReturns the id
of this component or automatically generates and\nreturns an id
if an id
is not defined yet:
'ext-comp-' + (++Ext.Component.AUTO_ID)\n
\n\nid
\nReturns the height in pixels of the body element (not including the height of any framing elements).\nFor the frame height see getFrameHeight.
\nThe body height
\nReturns the width in pixels of the body element (not including the width of any framing elements).\nFor the frame width see getFrameWidth.
\nThe body width
\nprivate
\n\nReturns the Element to be used to contain the child Components of this Container.
\n\n\nAn implementation is provided which returns the Container's Element, but\nif there is a more complex structure to a Container, this may be overridden to return\nthe element into which the layout renders child Components.
\n\nThe Element to render child Components into.
\n\nOverrides: Ext.Container.getLayoutTarget
Gets the current size of the component's underlying element, including space taken by its margins.
\nAn object containing the element's size {width: (element width + left/right margins), height: (element height + top/bottom margins)}
\nGets the current XY position of the component's underlying element.
\nIf true the element's left and top are returned instead of page XY (defaults to false)
\nThe XY position of the element (e.g., [100, 200])
\nReturns the outermost Element of this Component which defines the Components overall size.
\n\n\nUsually this will return the same Element as getEl
,\nbut in some cases, a Component may have some more wrapping Elements around its main\nactive Element.
An example is a ComboBox. It is encased in a wrapping Element which\ncontains both the <input>
Element (which is what would be returned\nby its getEl
method, and the trigger button Element.\nThis Element is returned as the resizeEl
.\n\n
The Element which is to be resized by size managing layouts.
\nReturns the grid's selection model configured by the selModel
\nconfiguration option. If no selection model was configured, this will create\nand return a RowSelectionModel.
Gets the current size of the component's underlying element.
\nAn object containing the element's size {width: (element width), height: (element height)}
\nGets the source data object containing the property data. See setSource for details regarding the\nformat of the data object.
\nThe data object
\nGets the xtype for this component as registered with Ext.ComponentMgr. For a list of all\navailable xtypes, see the Ext.Component header. Example usage:
\n\nvar t = new Ext.form.TextField();\nalert(t.getXType()); // alerts 'textfield'\n
\n\nThe xtype
\nReturns this Component's xtype hierarchy as a slash-delimited string. For a list of all\navailable xtypes, see the Ext.Component header.
\n\n\nIf using your own subclasses, be aware that a Component must register its own xtype\nto participate in determination of inherited xtypes.
\n\n\nExample usage:
\n\n\nvar t = new Ext.form.TextField();\nalert(t.getXTypes()); // alerts 'component/box/field/textfield'\n
\n\nThe xtype hierarchy string
\nChecks to see if this object has any listeners for a specified event
\nThe name of the event to check for
\nTrue if the event is being listened for, else false
\nHide this component. Listen to the 'beforehide' event and return\nfalse to cancel hiding the component. Fires the 'hide'\nevent after hiding the component. Note this method is called internally if\nthe component is configured to be hidden
.
this
\nMethod to establish a reference to a component.
\nReturns true if this component is visible.
\nTrue if this component is visible, false otherwise.
\nTests whether or not this Component is of a specific xtype. This can test whether this Component is descended\nfrom the xtype (default) or whether it is directly of the xtype specified (shallow = true).
\n\n\nIf using your own subclasses, be aware that a Component must register its own xtype\nto participate in determination of inherited xtypes.
\n\n\nFor a list of all available xtypes, see the Ext.Component header.
\n\n\nExample usage:
\n\n\nvar t = new Ext.form.TextField();\nvar isText = t.isXType('textfield'); // true\nvar isBoxSubclass = t.isXType('box'); // true, descended from BoxComponent\nvar isBoxInstance = t.isXType('box', true); // false, not a direct BoxComponent instance\n
\n\nThe xtype to check for this Component. Note that the the component can either be an instance\nor a component class:
\n\nvar c = new Ext.Component();\nconsole.log(c.isXType(c));\nconsole.log(c.isXType(Ext.Component));\n
\n\nFalse to check whether this Component is descended from the xtype (this is\nthe default), or true to check whether this Component is directly of the specified xtype.
\nTrue if this component descends from the specified xtype, false otherwise.
\nAdds listeners to any Observable object (or Elements) which are automatically removed when this Component\nis destroyed. Usage:
\n\n\nmyGridPanel.mon(myGridPanel.getSelectionModel(), 'selectionchange', handleSelectionChange, null, {buffer: 50});\n\n\n\n\n\n
or:
\n\n\nmyGridPanel.mon(myGridPanel.getSelectionModel(), {\n selectionchange: handleSelectionChange,\n buffer: 50\n});\n\n\n\n\n
The item to which to add a listener/listeners.
\nThe event name, or an object containing event name properties.
\nOptional. If the ename
parameter was an event name, this\nis the handler function.
Optional. If the ename
parameter was an event name, this\nis the scope (this
reference) in which the handler function is executed.
Optional. If the ename
parameter was an event name, this\nis the addListener options.
Removes listeners that were added by the mon method.
\nThe item from which to remove a listener/listeners.
\nThe event name, or an object containing event name properties.
\nOptional. If the ename
parameter was an event name, this\nis the handler function.
Optional. If the ename
parameter was an event name, this\nis the scope (this
reference) in which the handler function is executed.
Appends an event handler to this object (shorthand for addListener.)
\nThe type of event to listen for
\nThe method the event invokes
\nThe scope (this
reference) in which the handler function is executed.\nIf omitted, defaults to the object which fired the event.
An object containing handler configuration.
\nprivate
\n\nMethod to manage awareness of when components are added to their\nrespective Container, firing an added event.\nReferences are established at add time rather than at render time.
\nContainer which holds the component
\nPosition at which the component was added
\nOverrides: Ext.Component.onAdded
private
\nprivate
\nprivate
\nMethod to manage awareness of when components are removed from their\nrespective Container, firing an removed event. References are properly\ncleaned up after removing a component from its owning container.
\nprivate
\nReconfigures the grid to use a different Store and Column Model\nand fires the 'reconfigure' event. The View will be bound to the new\nobjects and refreshed.
\n\n\nBe aware that upon reconfiguring a GridPanel, certain existing settings may become\ninvalidated. For example the configured autoExpandColumn may no longer exist in the\nnew ColumnModel. Also, an existing PagingToolbar will still be bound\nto the old Store, and will need rebinding. Any plugins might also need reconfiguring\nwith the new data.
\n\nThe new Ext.data.Store object
\nThe new Ext.grid.ColumnModel object
\nRelays selected events from the specified Observable as if the events were fired by this.
\nThe Observable whose events this object is to relay.
\nArray of event names to relay.
\nRemoves all components from this container.
\nTrue to automatically invoke the removed Component's Ext.Component.destroy function.\nDefaults to the value of this Container's autoDestroy config.
\nArray of the destroyed components
\nRemoves a CSS class from the component's underlying element.
\nThe CSS class name to remove
\nthis
\nRemoves an event handler.
\nThe type of event the handler was associated with.
\nThe handler to remove. This must be a reference to the function passed into the addListener call.
\nThe scope originally specified for the handler.
\nRender this Component into the passed HTML element.
\n\n\nIf you are using a Container object to house this Component, then\ndo not use the render method.
\n\n\nA Container's child Components are rendered by that Container's\nlayout manager when the Container is first rendered.
\n\n\nCertain layout managers allow dynamic addition of child components. Those that do\ninclude Ext.layout.CardLayout, Ext.layout.AnchorLayout,\nExt.layout.FormLayout, Ext.layout.TableLayout.
\n\n\nIf the Container is already rendered when a new child Component is added, you may need to call\nthe Container's doLayout to refresh the view which causes any\nunrendered child Components to be rendered. This is required so that you can add multiple\nchild components if needed while only refreshing the layout once.
\n\n\nWhen creating complex UIs, it is important to remember that sizing and positioning\nof child items is the responsibility of the Container's layout manager.\nIf you expect child items to be sized in response to user interactions, you must\nconfigure the Container with a layout manager which creates and manages the type of layout you\nhave in mind.
\n\n\nOmitting the Container's layout config means that a basic\nlayout manager is used which does nothing but render child components sequentially into the\nContainer. No sizing or positioning will be performed in this situation.
\n\nThe element this Component should be\nrendered into. If it is being created from existing markup, this should be omitted.
\nThe element ID or DOM node index within the container before\nwhich this component will be inserted (defaults to appending to the end of the container)
\nthis
\nResume firing events. (see suspendEvents)\nIf events were suspended using the queueSuspended parameter, then all\nevents fired during event suspension will be sent to any listeners now.
\nSets the overflow on the content element of the component.
\nTrue to allow the Component to auto scroll.
\nthis
\nSets the height of the component. This method fires the resize event.
\nThe new height to set. This may be one of:
this
\nSets the CSS class that provides the icon image for this panel. This method will replace any existing\nicon class if one has already been set and fire the iconchange event after completion.
\nThe new CSS class name
\nSets the page XY position of the component. To set the left and top instead, use setPosition.\nThis method fires the move event.
\nthis
\nSets the left and top of the component. To set the page XY position instead, use setPagePosition.\nThis method fires the move event.
\nthis
\nSets the value of a property.
\nThe name of the property to set
\nThe value to test
\nTrue to create the property if it doesn't already exist. Defaults to false.
\nSets the width and height of this BoxComponent. This method fires the resize event. This method can accept\neither width and height as separate arguments, or you can pass a size object like {width:10, height:20}
.
The new width to set. This may be one of:
{width: widthValue, height: heightValue}
.undefined
to leave the width unchanged.The new height to set (not required if a size object is passed as the first arg).\nThis may be one of:
undefined
to leave the height unchanged.this
\nSets the source data object containing the property data. The data object can contain one or more name/value\npairs representing all of the properties of an object to display in the grid, and this data will automatically\nbe loaded into the grid's store. The values should be supplied in the proper data type if needed,\notherwise string type will be assumed. If the grid already contains data, this method will replace any\nexisting data. See also the source config value. Example usage:
\n\ngrid.setSource({\n \"(name)\": \"My Object\",\n \"Created\": new Date(Date.parse('10/15/2006')), // date type\n \"Available\": false, // boolean type\n \"Version\": .01, // decimal type\n \"Description\": \"A test object\"\n});\n
\n\nThe data object
\nSets the title text for the panel and optionally the icon class.
\n\n\nIn order to be able to set the title, a header element must have been created\nfor the Panel. This is triggered either by configuring the Panel with a non-blank title
,\nor configuring it with header: true
.
The title text to set
\niconCls A user-defined CSS class that provides the icon image for this panel
\nthis
\nConvenience function to hide or show this component by boolean.
\nTrue to show, false to hide
\nthis
\nSets the width of the component. This method fires the resize event.
\nThe new width to set. This may be one of:
this
\nShow this component. Listen to the 'beforeshow' event and return\nfalse to cancel showing the component. Fires the 'show'\nevent after showing the component.
\nthis
\nStops any active editing
\nTrue to cancel any changes
\nOverrides: Ext.grid.GridPanel.stopEditing
Suspend the firing of all events. (see resumeEvents)
\nPass as true to queue up suspended events to be fired\nafter the resumeEvents call instead of discarding all suspended events;
\nForce the component's size to recalculate based on the underlying element's current height and width.
\nthis
\nShortcut for performing an expand or collapse based on the current state of the panel.
\nTrue to animate the transition, else false (defaults to the value of the\nanimCollapse panel config)
\nthis
\nRemoves an event handler (shorthand for removeListener.)
\nThe type of event the handler was associated with.
\nThe handler to remove. This must be a reference to the function passed into the addListener call.
\nThe scope originally specified for the handler.
\nUpdate the content area of a component.
\nIf this component has been configured with a template via the tpl config\nthen it will use this argument as data to populate the template.\nIf this component was not configured with a template, the components\ncontent area will be updated via Ext.Element update
\n(optional) Only legitimate when using the html configuration. Defaults to false
\n(optional) Only legitimate when using the html configuration. Callback to execute when scripts have finished loading
\nSets the current box measurements of the component's underlying element.
\nAn object in the format {x, y, width, height}
\nthis
\nprivate
\nFires after the Panel has been visually activated.\nNote that Panels do not directly support being activated, but some Panel subclasses\ndo (like Ext.Window). Panels which are child Components of a TabPanel fire the\nactivate and deactivate events under the control of the TabPanel.
\nThe Panel that has been activated.
\nFires when a component is added to an Ext.Container
\nContainer which holds the component
\nPosition at which the component was added
\nFires after a cell is edited. The edit event object has the following properties
grid.on('afteredit', afterEdit, this );\n\nfunction afterEdit(e) {\n // execute an XHR to send/commit data to the server, in callback do (if successful):\n e.record.commit();\n};\n
\n\nAn edit event (see above for description)
\nFires after the component rendering is finished.
\n\n\nThe afterrender event is fired after this Component has been rendered, been postprocesed\nby any afterRender method defined for the Component, and, if stateful, after state\nhas been restored.
\n\nFires before the Panel is closed. Note that Panels do not directly support being closed, but some\nPanel subclasses do (like Ext.Window) or a Panel within a Ext.TabPanel. This event only\napplies to such subclasses.\nA handler can return false to cancel the close.
\nThe Panel being closed.
\nFires before the Panel is collapsed. A handler can return false to cancel the collapse.
\nthe Panel being collapsed.
\nTrue if the collapse is animated, else false.
\nFires before the component is destroyed. Return false from an event handler to stop the destroy.
\nFires before cell editing is triggered. The edit event object has the following properties
An edit event (see above for description)
\nFires before the Panel is expanded. A handler can return false to cancel the expand.
\nThe Panel being expanded.
\nTrue if the expand is animated, else false.
\nFires before the component is hidden by calling the hide method.\nReturn false from an event handler to stop the hide.
\nFires before a property value changes. Handlers can return false to cancel the property change\n(this will internally call Ext.data.Record.reject on the property's record).
\nFires before the component is rendered. Return false from an\nevent handler to stop the render.
\nFires before the component is shown by calling the show method.\nReturn false from an event handler to stop the show.
\nFires before the state of the component is restored. Return false from an event handler to stop the restore.
\nThe hash of state values returned from the StateProvider. If this\nevent is not vetoed, then the state object is passed to applyState. By default,\nthat simply copies property values into this Component. The method maybe overriden to\nprovide custom state restoration.
\nFires before the state of the component is saved to the configured state provider. Return false to stop the save.
\nThe hash of state values. This is determined by calling\ngetState() on the Component. This method must be provided by the\ndeveloper to return whetever representation of state is required, by default, Ext.Component\nhas a null implementation.
\nFires when a cell is clicked.\nThe data for the cell is drawn from the Record\nfor this row. To access the data in the listener function use the\nfollowing technique:
\n\nfunction(grid, rowIndex, columnIndex, e) {\n var record = grid.getStore().getAt(rowIndex); // Get the Record\n var fieldName = grid.getColumnModel().getDataIndex(columnIndex); // Get field name\n var data = record.get(fieldName);\n}\n
\n\nFires when a cell is double clicked
\nFires before a cell is clicked
\nFires after the Panel is closed. Note that Panels do not directly support being closed, but some\nPanel subclasses do (like Ext.Window) or a Panel within a Ext.TabPanel.
\nThe Panel that has been closed.
\nFires after the Panel has been collapsed.
\nthe Panel that has been collapsed.
\nFires when the container is clicked. The container consists of any part of the grid body that is not covered by a row.
\nFires when the container is double clicked. The container consists of any part of the grid body that is not covered by a row.
\nFires before the container is clicked. The container consists of any part of the grid body that is not covered by a row.
\nFires after the Panel has been visually deactivated.\nNote that Panels do not directly support being deactivated, but some Panel subclasses\ndo (like Ext.Window). Panels which are child Components of a TabPanel fire the\nactivate and deactivate events under the control of the TabPanel.
\nThe Panel that has been deactivated.
\nFires after the Panel has been expanded.
\nThe Panel that has been expanded.
\nFires when the grid's grouping changes (only applies for grids with a GroupingView)
\nA string with the grouping field, null if the store is not grouped.
\nFires when group header is clicked. Only applies for grids with a GroupingView.
\nFires when group header is double clicked. Only applies for grids with a GroupingView.
\nFires before a group header is clicked. Only applies for grids with a GroupingView.
\nFires when a header cell is double clicked
\nFires before a header is clicked
\nFires after the component is hidden.\nFires after the component is hidden when calling the hide method.
\nFires after the component is moved.
\nThe new x position
\nThe new y position
\nFires after a property value has changed.
\nFires when the grid is reconfigured with a new store and/or column model.
\nThe new store
\nThe new column model
\nFires when a component is removed from an Ext.Container
\nContainer which holds the component
\nFires after the component is resized.
\nThe box-adjusted width that was set
\nThe box-adjusted height that was set
\nThe width that was originally specified
\nThe height that was originally specified
\nFires when the row body is clicked. Only applies for grids with enableRowBody configured.
\nFires when the row body is double clicked. Only applies for grids with enableRowBody configured.
\nFires before the row body is clicked. Only applies for grids with enableRowBody configured.
\nFires when the grid's store sort changes
\nAn object with the keys field and direction
\nFires after the state of the component is restored.
\nThe hash of state values returned from the StateProvider. This is passed\nto applyState. By default, that simply copies property values into this\nComponent. The method maybe overriden to provide custom state restoration.
\nFires after the state of the component is saved to the configured state provider.
\nThe hash of state values. This is determined by calling\ngetState() on the Component. This method must be provided by the\ndeveloper to return whetever representation of state is required, by default, Ext.Component\nhas a null implementation.
\nFires after a cell is edited, but before the value is set in the record. Return false\nto cancel the change. The edit event object has the following properties
Usage example showing how to remove the red triangle (dirty record indicator) from some\nrecords (not all). By observing the grid's validateedit event, it can be cancelled if\nthe edit occurs on a targeted row (for example) and then setting the field's new value\nin the Record directly:
\n\ngrid.on('validateedit', function(e) {\n var myTargetRow = 6;\n\n if (e.row == myTargetRow) {\n e.cancel = true;\n e.record.data[e.field] = e.value;\n }\n});\n
\n\nAn edit event (see above for description)
\nFires when the grid view is available (use this for selecting a default row).
\n