| Defined In: | Combo.js |
| Class: | Ext.form.ComboBox |
| Extends: | Ext.form.TriggerField |
| 配置项 | 定义者 | |
|---|---|---|
|
transform
: Mixed
The id, DOM node or element of an e...
The id, DOM node or element of an existing select to convert to a ComboBox
|
ComboBox | |
|
lazyRender
: Boolean
True to prevent the ComboBox from r...
True to prevent the ComboBox from rendering until requested (should always be used when
rendering into an Ext.Editor, defaults to false)
|
ComboBox | |
|
autoCreate
: String/Object
一个指定的DomHelper对象,如果为真则为一个默认对象(默认 {t...
一个指定的DomHelper对象,如果为真则为一个默认对象(默认 {tag: "input", type: "text", size: "20", autocomplete: "off"})
|
Field | |
|
store
: Ext.data.Store
The data store to which this combo ...
The data store to which this combo is bound (defaults to undefined)
|
ComboBox | |
|
title
: String
If supplied, a header element is cr...
If supplied, a header element is created containing this text and added into the top of
the dropdown list (defaults to undefined, with no header element)
|
ComboBox | |
|
listWidth
: Number
The width in pixels of the dropdown...
The width in pixels of the dropdown list (defaults to the width of the ComboBox field)
|
ComboBox | |
|
displayField
: String
The underlying data field name to b...
The underlying data field name to bind to this ComboBox (defaults to undefined if
mode = 'remote' or 'text' if transforming a select)
|
ComboBox | |
|
valueField
: String
The underlying data value name to b...
The underlying data value name to bind to this ComboBox (defaults to undefined if
mode = 'remote' or 'value' if transforming a select) Note: use of a valueField requires the user to make a selection in order for a value to be mapped.
|
ComboBox | |
|
hiddenName
: String
If specified, a hidden form field w...
If specified, a hidden form field with this name is dynamically generated to store the
field's data value (defaults to the underlying DOM element's name). Required for the combo's value to automatically post during a form submission.
|
ComboBox | |
|
hiddenId
: String
If #hiddenName is specified, hidden...
If #hiddenName is specified, hiddenId can also be provided to give the hidden field
a unique id (defaults to the hiddenName). The hiddenId and combo #id should be different, since no two DOM nodes should share the same id.
|
ComboBox | |
|
listClass
: String
CSS class to apply to the dropdown ...
CSS class to apply to the dropdown list element (defaults to '')
|
ComboBox | |
|
selectedClass
: String
CSS class to apply to the selected ...
CSS class to apply to the selected item in the dropdown list (defaults to 'x-combo-selected')
|
ComboBox | |
|
triggerClass
: String
应用到触发器身上的CSS样式类
应用到触发器身上的CSS样式类
|
TriggerField | |
|
shadow
: Boolean/String
True or "sides" for the default eff...
True or "sides" for the default effect, "frame" for 4-way shadow, and "drop" for bottom-right
|
ComboBox | |
|
listAlign
: String
A valid anchor position value. See ...
A valid anchor position value. See Ext.Element#alignTo for details on supported
anchor positions (defaults to 'tl-bl')
|
ComboBox | |
|
maxHeight
: Number
The maximum height in pixels of the...
The maximum height in pixels of the dropdown list before scrollbars are shown (defaults to 300)
|
ComboBox | |
|
triggerAction
: String
The action to execute when the trig...
The action to execute when the trigger field is activated. Use 'all' to run the
query specified by the allQuery config option (defaults to 'query')
|
ComboBox | |
|
minChars
: Number
The minimum number of characters th...
The minimum number of characters the user must type before autocomplete and typeahead activate
(defaults to 4 if remote or 0 if local, does not apply if editable = false)
|
ComboBox | |
|
typeAhead
: Boolean
True to populate and autoselect the...
True to populate and autoselect the remainder of the text being typed after a configurable
delay (typeAheadDelay) if it matches a known value (defaults to false)
|
ComboBox | |
|
queryDelay
: Number
The length of time in milliseconds ...
The length of time in milliseconds to delay between the start of typing and sending the
query to filter the dropdown list (defaults to 500 if mode = 'remote' or 10 if mode = 'local')
|
ComboBox | |
|
pageSize
: Number
If greater than 0, a paging toolbar...
If greater than 0, a paging toolbar is displayed in the footer of the dropdown list and the
filter queries will execute with page start and limit parameters. Only applies when mode = 'remote' (defaults to 0)
|
ComboBox | |
|
selectOnFocus
: Boolean
值为 ture 时表示字段获取焦点时自动选择字段既有文本(默认为 fa...
值为 ture 时表示字段获取焦点时自动选择字段既有文本(默认为 false)
|
TextField | |
|
queryParam
: String
Name of the query as it will be pas...
Name of the query as it will be passed on the querystring (defaults to 'query')
|
ComboBox | |
|
loadingText
: String
The text to display in the dropdown...
The text to display in the dropdown list while data is loading. Only applies
when mode = 'remote' (defaults to 'Loading...')
|
ComboBox | |
|
resizable
: Boolean
True to add a resize handle to the ...
True to add a resize handle to the bottom of the dropdown list (defaults to false)
|
ComboBox | |
|
handleHeight
: Number
The height in pixels of the dropdow...
The height in pixels of the dropdown list resize handle if resizable = true (defaults to 8)
|
ComboBox | |
|
editable
: Boolean
False to prevent the user from typi...
False to prevent the user from typing text directly into the field, just like a
traditional select (defaults to true)
|
ComboBox | |
|
allQuery
: String
The text query to send to the serve...
The text query to send to the server to return all records for the list with no filtering (defaults to '')
|
ComboBox | |
|
mode
: String
Set to 'local' if the ComboBox load...
Set to 'local' if the ComboBox loads local data (defaults to 'remote' which loads from the server)
|
ComboBox | |
|
minListWidth
: Number
The minimum width of the dropdown l...
The minimum width of the dropdown list in pixels (defaults to 70, will be ignored if
listWidth has a higher value)
|
ComboBox | |
|
forceSelection
: Boolean
True to restrict the selected value...
True to restrict the selected value to one of the values in the list, false to
allow the user to set arbitrary text into the field (defaults to false)
|
ComboBox | |
|
typeAheadDelay
: Number
The length of time in milliseconds ...
The length of time in milliseconds to wait until the typeahead text is displayed
if typeAhead = true (defaults to 250)
|
ComboBox | |
|
valueNotFoundText
: String
When using a name/value combo, if t...
When using a name/value combo, if the value passed to setValue is not found in
the store, valueNotFoundText will be displayed as the field text if defined (defaults to undefined)
|
ComboBox | |
|
lazyInit
: Boolean
True to not initialize the list for...
True to not initialize the list for this combo until the field is focused. (defaults to true)
|
ComboBox | |
|
tpl
: String/Ext.XTemplate
The template string, or Ext.XTempla...
The template string, or Ext.XTemplate
instance to use to display each item in the dropdown list. Use this to create custom UI layouts for items in the list.
If you wish to preserve the default visual look of list items, add the CSS class name x-combo-list-itemto the template's container element. The template must contain one or more substitution parameters using field names from the Combo's {@link #store Store}. An example of a custom template would be adding an ext:qtipattribute which might display other fields from the Store. The dropdown list is displayed in a DataView. See Ext.DataView for details. |
ComboBox | |
|
hideTrigger
: Boolean
为true时隐藏触发元素,只显示基本文本域(默认为false)。
为true时隐藏触发元素,只显示基本文本域(默认为false)。
|
TriggerField | |
|
grow
: Boolean
当值为 true 时表示字段可以根据内容自动伸缩
当值为 true 时表示字段可以根据内容自动伸缩
|
TextField | |
|
growMin
: Number
当 grow = true 时允许的字段最小宽度(默认为 30)
当 grow = true 时允许的字段最小宽度(默认为 30)
|
TextField | |
|
growMax
: Number
当 grow = true 时允许的字段最大宽度(默认为 800)
当 grow = true 时允许的字段最大宽度(默认为 800)
|
TextField | |
|
vtype
: String
Ext.form.VTypes 中定义的效验类型名(默认为 null)
Ext.form.VTypes 中定义的效验类型名(默认为 null)
|
TextField | |
|
maskRe
: String
一个用来过滤无效按键的正则表达式(默认为 null)
一个用来过滤无效按键的正则表达式(默认为 null)
|
TextField | |
|
disableKeyFilter
: Boolean
值为 true 时禁用输入按键过滤(默认为 false)
值为 true 时禁用输入按键过滤(默认为 false)
|
TextField | |
|
allowBlank
: Boolean
值为 false 时将效验输入字符个数大于0(默认为 true)
值为 false 时将效验输入字符个数大于0(默认为 true)
|
TextField | |
|
minLength
: Number
输入字段所需的最小字符数(默认为 0)
输入字段所需的最小字符数(默认为 0)
|
TextField | |
|
maxLength
: Number
输入字段允许的最大字符数(默认为 Number.MAX_VALUE)
输入字段允许的最大字符数(默认为 Number.MAX_VALUE)
|
TextField | |
|
minLengthText
: String
输入字符数小于最小字符数时显示的文本(默认为 "The minimum...
输入字符数小于最小字符数时显示的文本(默认为 "The minimum length for this field is {minLength}")
|
TextField | |
|
maxLengthText
: String
输入字符数小于最小字符数时显示的文本(默认为 "The maximum...
输入字符数小于最小字符数时显示的文本(默认为 "The maximum length for this field is {maxLength}")
|
TextField | |
|
blankText
: String
当允许为空效验失败时显示的错误文本(默认为 "This field i...
当允许为空效验失败时显示的错误文本(默认为 "This field is required")
|
TextField | |
|
validator
: Function
字段效验时调用的自定义的效验函数(默认为 null)。如果启用此项, ...
字段效验时调用的自定义的效验函数(默认为 null)。如果启用此项, 则此函数将在所有基础效验成功之后被调用, 调用函数时传递的参数为该字段的值。且此函数的有效返回应为成功时返回 true, 失败时返回错误文本。
|
TextField | |
|
regex
: RegExp
一个用以在效验时使用的 JavaScript 正则表达式对象(默认为 ...
一个用以在效验时使用的 JavaScript 正则表达式对象(默认为 null)。如果启用此项, 则此正则表达式将在所有基础效验成功之后被执行, 执行此正则表达式时传递的参数为该字段的值。如果效验失败, 则根据 #regexText 的设置将字段标记为无效。
|
TextField | |
|
regexText
: String
当 {@link #regex} 被设置且效验失败时显示的错误文本(默...
当 {@link #regex} 被设置且效验失败时显示的错误文本(默认为 "")
|
TextField | |
|
emptyText
: String
空字段中显示的文本(默认为 null)。
空字段中显示的文本(默认为 null)。
|
TextField | |
|
emptyClass
: String
#emptyText 使用的CSS样式类名(默认为 'x-form-e...
#emptyText 使用的CSS样式类名(默认为 'x-form-empty-field')。此类的添加与移除均由当前字段是否有值来自动处理。
|
TextField | |
|
enableKeyEvents
: Boolean
True to enable the proxying of key ...
True to enable the proxying of key events for the HTML input field (defaults to false)
True表示,为HTML的input输入字段激活键盘事件的代理(默认为false)
|
TextField | |
|
: String
表单元素无效时标在上面的CSS样式(默认为"x-form-invalid")
表单元素无效时标在上面的CSS样式(默认为"x-form-invalid")
|
Field | |
|
invalidText
: String
表单元素无效时标在上面的文本信息(默认为"The value in t...
表单元素无效时标在上面的文本信息(默认为"The value in this field is invalid")
|
Field | |
|
focusClass
: String
当表单元素获取焦点时的CSS样式(默认为"x-form-focus")
当表单元素获取焦点时的CSS样式(默认为"x-form-focus")
|
Field | |
|
validationEvent
: String/Boolean
初始化元素验证的事件名,如果设假,则不进行验证(默认"keyup")
初始化元素验证的事件名,如果设假,则不进行验证(默认"keyup")
|
Field | |
|
validateOnBlur
: Boolean
是否当失去焦点时验证此表单元素(默认真)。
是否当失去焦点时验证此表单元素(默认真)。
|
Field | |
|
validationDelay
: Number
用户输入开始到验证开始的间隔毫秒数(默认250毫秒)
用户输入开始到验证开始的间隔毫秒数(默认250毫秒)
|
Field | |
|
fieldClass
: String
表单元素一般状态CSS样式(默认为"x-form-field")
表单元素一般状态CSS样式(默认为"x-form-field")
|
Field | |
|
msgTarget
: String
错误提示的显示位置。 可以是以下列表中的任意一项(默认为"qtip")...
错误提示的显示位置。 可以是以下列表中的任意一项(默认为"qtip")
Value Description ----------- ---------------------------------------------------------------------- qtip Display a quick tip when the user hovers over the field 当鼠标旋停在表单元素上时显示。 title Display a default browser title attribute popup 显示浏览器默认"popup"提示。 under Add a block div beneath the field containing the error text 创建一个包函错误信息的"div"对象(块显示方式)在表单元素下面。 side Add an error icon to the right of the field with a popup on hover 在表单元素右侧加错误图标,鼠标旋停上面时显示错误信息。 [element id] Add the error text directly to the innerHTML of the specified element 直接在指定的对象的"innerHTML"属性里添加错误信息。 |
Field | |
|
msgFx
: String
Experimental
表单元素无效提示显示的动画效果(...
Experimental
表单元素无效提示显示的动画效果(默认为"normal")
|
Field | |
|
readOnly
: Boolean
如果为真,则在HTML时标明此表单元素为只读 -- 注意:只是设置表单...
如果为真,则在HTML时标明此表单元素为只读 -- 注意:只是设置表单对象的只读属性。
|
Field | |
|
disabled
: Boolean
为真则标明此表单元素为不可用(默认为假)
为真则标明此表单元素为不可用(默认为假)
|
Field | |
|
inputType
: String
"input"类表单元素的类型属性 -- 例如:radio,text...
"input"类表单元素的类型属性 -- 例如:radio,text,password (默认为"text")
|
Field | |
|
height
: Number
此组件的高度(单位象素)(缺省为auto)。
此组件的高度(单位象素)(缺省为auto)。
|
BoxComponent | |
|
width
: Number
此组件的宽度(单位象素)(缺省为auto)。
此组件的宽度(单位象素)(缺省为auto)。
|
BoxComponent | |
|
autoHeight
: Boolean
True表示为使用height:'auto',false表示为使用固定...
True表示为使用height:'auto',false表示为使用固定高度(缺省为false)。
|
BoxComponent | |
|
autoWidth
: Boolean
True表示为使用width:'auto',false表示为使用固定宽...
True表示为使用width:'auto',false表示为使用固定宽度(缺省为false)。
|
BoxComponent | |
|
deferHeight
: Boolean
True表示为根据外置的组件延时计算高度,false表示允许该组件自行...
True表示为根据外置的组件延时计算高度,false表示允许该组件自行设置高度(缺省为false)。
|
BoxComponent | |
|
id
: String
唯一的组件id(默认为自动分配的id)。
唯一的组件id(默认为自动分配的id)。
|
Component | |
|
xtype
: String
The registered xtype to create. 用于...
The registered xtype to create. 用于登记一个xtype。 This config option is not used when passing a config object into a constructor. This config option is used only when lazy instantiation is being used, and a child item of a Container is being specified not as a fully instantiated Component, but as a Component config object. The xtype will be looked up at render time up to determine what type of child Component to create.
The predefined xtypes are listed {@link Ext.Component here}. If you subclass Components to create your own Components, you may register them using Ext.ComponentMgr#registerType in order to be able to take advantage of lazy instantiation and rendering. |
Component | |
|
cls
: String
一个可选添加的CSS样式类,加入到组件的容器上(默认为'')。 这为容...
一个可选添加的CSS样式类,加入到组件的容器上(默认为'')。 这为容器或容器的子节点加入标准CSS规则提供了方便。
|
Component | |
|
style
: String
作用在组件元素上特定的样式。该值的有效格式应如Ext.Element#...
作用在组件元素上特定的样式。该值的有效格式应如Ext.Element#applyStyles。
|
Component | |
|
plugins
: Object/Array
针对该组件自定义的功能,是对象或这些对象组成的数组。 一个有效的插件须...
针对该组件自定义的功能,是对象或这些对象组成的数组。 一个有效的插件须保证带有一个init的方法以便接收属于Ext.Component类型的引用。 当一个组件被创建后,若发现由插件可用,组件会调用每个插件上的init方法,传入一个应用到插件本身。 这样,插件便能按照组件所提供的功能,调用到组件的方法或响应事件。
|
Component | |
|
applyTo
: Mixed
节点的id,或是DOM节点,又或者是与DIV相当的现有元素,这些都是文...
节点的id,或是DOM节点,又或者是与DIV相当的现有元素,这些都是文档中已经存在的元素 当使用applyTo后,主元素所指定的id或CSS样式类将会作用于组件构成的部分, 而被创建的组件将会尝试着根据这些markup构建它的子组件。 使用了这项配置后,不需要执行render()的方法。 若指定了applyTo,那么任何由#renderTo传入的值将会被忽略并使用目标元素的父级元素作为组件的容器。
|
Component | |
|
renderTo
: Mixed
容器渲染的那个节点的id,或是DOM节点,又或者是与DIV相当的现有元...
容器渲染的那个节点的id,或是DOM节点,又或者是与DIV相当的现有元素。 使用了这项配置后,不需要执行render()的方法。
|
Component | |
|
disabledClass
: String
当组件被禁用时作用的CSS样式类(默认为"x-item-disable...
当组件被禁用时作用的CSS样式类(默认为"x-item-disabled")。
|
Component | |
|
allowDomMove
: Boolean
当渲染进行时能否移动Dom节点上的组件(默认为true)。
当渲染进行时能否移动Dom节点上的组件(默认为true)。
|
Component | |
|
autoShow
: Boolean
True表示为在渲染的时候先检测一下有否关于隐藏的样式类(如:'x-h...
True表示为在渲染的时候先检测一下有否关于隐藏的样式类(如:'x-hidden'或'x-hide-display'),有就移除隐藏的样式类。 (缺省为false)
|
Component | |
|
hideMode
: String
这个组件是怎么隐藏的。可支持的值有"visibility" (css中...
这个组件是怎么隐藏的。可支持的值有"visibility" (css中的visibility), "offsets"(负偏移位置)和 "display"(css中的display)-默认为“display”。
|
Component | |
|
hideParent
: Boolean
True表示为当隐藏/显示组件时对组件的容器亦一同隐藏/显示,fals...
True表示为当隐藏/显示组件时对组件的容器亦一同隐藏/显示,false就只会隐藏/显示组件本身(默认为false)。 例如,可设置一个hide:true的隐藏按钮在window,如果按下就通知其父容器一起隐藏,这样做起来比较快捷省事。
|
Component | |
|
listeners
: Object
一个配置项对象,可方便在该对象初始化时便加入多个事件处理函数。 这应该...
一个配置项对象,可方便在该对象初始化时便加入多个事件处理函数。 这应该是一个如#addListener有效的配置项对象,即可一次过加入多个事件处理函数。
|
Observable | |
| 属性 | 定义者 | |
|---|---|---|
|
view: this.
The {@link Ext.DataView DataView} ...
The {@link Ext.DataView DataView} used to display the ComboBox's options.
|
ComboBox | |
|
initialConfig: initialConfig
组件初始化配置项。只读的
组件初始化配置项。只读的
|
Component | |
|
ownerCt: ownerCt
组件自身的Ext.Container(默认是undefined,只有...
组件自身的Ext.Container(默认是undefined,只有在组件加入到容器时才会自动设置该属性)只读的。
|
Component | |
|
*/: */
True表示为该组件已经渲染好了。只读的。
True表示为该组件已经渲染好了。只读的。
|
Component | |
| 方法 | 定义者 | |
|---|---|---|
ComboBox
(
Object config
)
: Ext.form.ComboBox
构造器
构造器
参数项:
|
ComboBox | |
setEditable
(
Boolean value
)
Allow or prevent the user from dir...
Allow or prevent the user from directly editing the field text. If false is passed, the user will only be able to select from the items defined in the dropdown list. This method is the runtime equivalent of setting the 'editable' config option at config time.
参数项:
|
ComboBox | |
|
getValue
(
)
: Mixed
返回格式化后的数据(未定义或空值则会返回'')。返回原始值可以查看#...
返回格式化后的数据(未定义或空值则会返回'')。返回原始值可以查看#getRawValue。
参数项:
|
Field | |
|
clearValue
(
)
Clears any text/value currently se...
Clears any text/value currently set in the field
参数项:
|
ComboBox | |
setValue
(
Mixed value
)
设置元素值并加以验证。如果想跃过验证直接设值则请看#setRawVa...
设置元素值并加以验证。如果想跃过验证直接设值则请看#setRawValue。
参数项:
|
Field | |
|
isExpanded
(
)
Returns true if the dropdown list ...
Returns true if the dropdown list is expanded, else false.
参数项:
|
ComboBox | |
selectByValue
(
String value,
Boolean scrollIntoView
)
: Boolean
Select an item in the dropdown lis...
Select an item in the dropdown list by its data value. This function does NOT cause the select event to fire. The store must be loaded and the list expanded for this function to work, otherwise use setValue.
selected item if it is not currently in view (defaults to true)
参数项:
|
ComboBox | |
select
(
Number index,
Boolean scrollIntoView
)
Select an item in the dropdown lis...
Select an item in the dropdown list by its numeric index in the list. This function does NOT cause the select event to fire. The store must be loaded and the list expanded for this function to work, otherwise use setValue.
selected item if it is not currently in view (defaults to true)
参数项:
|
ComboBox | |
doQuery
(
String query,
Boolean forceAll
)
Execute a query to filter the drop...
Execute a query to filter the dropdown list. Fires the beforequery event prior to performing the query allowing the query action to be canceled if needed.
in the field than the minimum specified by the minChars config option. It also clears any filter previously saved in the current store (defaults to false)
参数项:
|
ComboBox | |
|
collapse
(
)
Hides the dropdown list if it is c...
Hides the dropdown list if it is currently expanded. Fires the 'collapse' event on completion.
参数项:
|
ComboBox | |
|
expand
(
)
Expands the dropdown list if it is...
Expands the dropdown list if it is currently hidden. Fires the 'expand' event on completion.
参数项:
|
ComboBox | |
TriggerField
(
Object config
)
: Ext.form.TriggerField
构造器
构造器
参数项:
|
TriggerField | |
onTriggerClick
(
EventObject e
)
该方法应该用于处理触发器的click事件。默认为空方法,要被某个实现...
该方法应该用于处理触发器的click事件。默认为空方法,要被某个实现的方法重写后才会有效。 @method
参数项:
|
TriggerField | |
TextField
(
Object config
)
: Ext.form.TextField
构造器
构造器
参数项:
|
TextField | |
|
reset
(
)
重置此元素的值到原始值,并且清除所有无效提示信息。
重置此元素的值到原始值,并且清除所有无效提示信息。
参数项:
|
Field | |
validateValue
(
Mixed value
)
: Boolean
根据字段的效验规则效验字段值, 并在效验失败时将字段标记为无效
根据字段的效验规则效验字段值, 并在效验失败时将字段标记为无效
参数项:
|
TextField | |
selectText
(
[Number start],
[Number end]
)
选择此字段中的文本
选择此字段中的文本
参数项:
|
TextField | |
|
autoSize
(
)
自动增长字段宽度以便容纳字段所允许的最大文本。仅在 grow = t...
自动增长字段宽度以便容纳字段所允许的最大文本。仅在 grow = true 时有效, 并触发 autosize 事件。
参数项:
|
TextField | |
Field
(
Object config
)
: Ext.form.Field
构造器
构造器
参数项:
|
Field | |
|
getName
(
)
: String
试图获取元素的名称。
试图获取元素的名称。
参数项:
|
Field | |
initValue
(
String/HTMLElement/Element el
)
: Ext.form.Fielhd
把组件应用到一个现有的对象上。这个被用来代替render()方法。
把组件应用到一个现有的对象上。这个被用来代替render()方法。
参数项:
|
Field | |
|
isDirty
(
)
: Boolean
它的原始值没有变更,并且它是可用的则返回真。
它的原始值没有变更,并且它是可用的则返回真。
参数项:
|
Field | |
isValid
(
Boolean preventMark
)
: Boolean
此元素是否有效。
此元素是否有效。
参数项:
|
Field | |
|
validate
(
)
: Boolean
验证域的值
验证域的值
参数项:
|
Field | |
markInvalid
(
String msg
)
让该域无效
让该域无效
参数项:
|
Field | |
|
clearInvalid
(
)
清除元素任何无效标志样式与信息。
清除元素任何无效标志样式与信息。
参数项:
|
Field | |
|
getRawValue
(
)
: Mixed
返回可能无效的原始值。
返回可能无效的原始值。
参数项:
|
Field | |
setRawValue
(
Mixed value
)
跃过验证直接设置DOM元素值。需要验证的设值方法可以查看{@link...
跃过验证直接设置DOM元素值。需要验证的设值方法可以查看{@link #setValue}。
参数项:
|
Field | |
BoxComponent
(
Ext.Element/String/Object config
)
: Ext.BoxComponent
构造器
构造器
参数项:
|
BoxComponent | |
setSize
(
Number/Object width,
Number height
)
: Ext.BoxComponent
设置组件的宽度和高度。
此方法会触发resize事件。
此方法...
设置组件的宽度和高度。
此方法会触发resize事件。
此方法既可接受单独的数字类型的参数,也可以传入一个size的对象,如 {width:10, height:20}。
参数项:
|
BoxComponent | |
setWidth
(
Number height
)
: Ext.BoxComponent
设置组件的宽度。此方法会触发resize事件。
设置组件的宽度。此方法会触发resize事件。
参数项:
|
BoxComponent | |
setHeight
(
Number height
)
: Ext.BoxComponent
设置组件的高度。此方法会触发resize事件。
设置组件的高度。此方法会触发resize事件。
参数项:
|
BoxComponent | |
|
getSize
(
)
: Object} 包含元素大小的对象,格式为{width: (元素宽度), height:(元素高度)
返回当前组件所属元素的大小。
返回当前组件所属元素的大小。
参数项:
|
BoxComponent | |
getPosition
(
[Boolean local]
)
: Array
对组件所在元素当前的XY位置
对组件所在元素当前的XY位置
参数项:
|
BoxComponent | |
getBox
(
[Boolean local]
)
: Object
返回对组件所在元素的测量矩形大小。
返回对组件所在元素的测量矩形大小。
参数项:
|
BoxComponent | |
updateBox
(
Object box
)
: Ext.BoxComponent
对组件所在元素的测量矩形大小,然后根据此值设置组件的大小。
对组件所在元素的测量矩形大小,然后根据此值设置组件的大小。
参数项:
|
BoxComponent | |
setPosition
(
Number left,
Number top
)
: Ext.BoxComponent
设置组件的left和top值。要设置基于页面的XY位置,可使用#s...
设置组件的left和top值。要设置基于页面的XY位置,可使用#setPagePosition。
此方法触发move事件。
参数项:
|
BoxComponent | |
setPagePosition
(
Number x,
Number y
)
: Ext.BoxComponent
设置组件页面上的left和top值。
要设置left、top的位...
设置组件页面上的left和top值。
要设置left、top的位置,可使用{@link #setPosition}。
此方法触发move事件。
参数项:
|
BoxComponent | |
|
syncSize
(
)
: Ext.BoxComponent
强制重新计算组件的大小尺寸,这个尺寸是基于所属元素当前的高度和宽度。
强制重新计算组件的大小尺寸,这个尺寸是基于所属元素当前的高度和宽度。
参数项:
|
BoxComponent | |
Component
(
Ext.Element/String/Object config
)
: Ext.Component
构造器
构造器
参数项:
|
Component | |
render
(
[Mixed container],
[String/Number position]
)
如果这是延时加载的组件,就要执行这个渲染的方法到其容器的元素。
...
如果这是延时加载的组件,就要执行这个渲染的方法到其容器的元素。
这个组件插入到容器的之前位置,可以是元素的ID或是DOM节点的索引(缺省是插入到容器的尾部)
参数项:
|
Component | |
applyToMarkup
(
String/HTMLElement el
)
把这个组件应用到当前有效的markup。执行该函数后,无须调用ren...
把这个组件应用到当前有效的markup。执行该函数后,无须调用render()
参数项:
|
Component | |
addClass
(
string cls
)
加入CSS样式类到组件所在的元素。
加入CSS样式类到组件所在的元素。
参数项:
|
Component | |
removeClass
(
string cls
)
移除CSS样式类到组件所属的元素。
移除CSS样式类到组件所属的元素。
参数项:
|
Component | |
|
destroy
(
)
清除任何的事件的句柄,在DOM中移除组件的元素,从容器Ext.Con...
清除任何的事件的句柄,在DOM中移除组件的元素,从容器Ext.Container中移除本身(如果适合的话)和在Ext.ComponentMgr注销 销毁的方法一般由框架自动执行,通常不需要直接执行。
参数项:
|
Component | |
|
getEl
(
)
: Ext.Element
返回所属的{@link Ext.Element}.
返回所属的{@link Ext.Element}.
参数项:
|
Component | |
|
getId
(
)
: String
返回该组件的id
返回该组件的id
参数项:
|
Component | |
|
getItemId
(
)
: String
返回该组件的item id。
返回该组件的item id。
参数项:
|
Component | |
focus
(
[Boolean selectText],
[Boolean/Number delay]
)
: Ext.Component
试着将焦点放到此项。
试着将焦点放到此项。
参数项:
|
Component | |
|
disable
(
)
: Ext.Component
禁止该组件。
禁止该组件。
参数项:
|
Component | |
|
enable
(
)
: Ext.Component
启用该组件。
启用该组件。
参数项:
|
Component | |
setDisabled
(
Boolean disabled
)
方便的函数用来控制组件禁用/可用。
方便的函数用来控制组件禁用/可用。
参数项:
|
Component | |
|
show
(
)
: Ext.Component
显示该组件。
显示该组件。
参数项:
|
Component | |
|
hide
(
)
: Ext.Component
隐藏该组件。
隐藏该组件。
参数项:
|
Component | |
setVisible
(
Boolean visible
)
: Ext.Component
方便的函数用来控制组件显示/隐藏。
方便的函数用来控制组件显示/隐藏。
参数项:
|
Component | |
|
isVisible
(
)
该组件可见时返回true。
该组件可见时返回true。
参数项:
|
Component | |
|
cloneConfig
(
)
: Ext.Component
根据原始传入到该实例的配置项值,克隆一份组件。
根据原始传入到该实例的配置项值,克隆一份组件。
参数项:
|
Component | |
|
getXType
(
)
: String
获取Ext.ComponentMgr在已登记组件的xtypes。 ...
获取Ext.ComponentMgr在已登记组件的xtypes。 全部可用的xtypes列表,可参考Ext.Component开头,用法举例:
参数项:
|
Component | |
isXType
(
String xtype,
[Boolean shallow]
)
测试这个组件是否属于某个指定的xtype。 这个方法既可测试该组件是...
测试这个组件是否属于某个指定的xtype。 这个方法既可测试该组件是否为某个xtype的子类,或直接是这个xtype的实例(shallow = true) 全部可用的xtypes列表,可参考Ext.Component开头,用法举例:
true就表示为测试该组件是否这个xtype本身的实例
参数项:
|
Component | |
|
getXTypes
(
)
: String
返回以斜杠分割的字符串,表示组件的xtype层次。 全部可用的xty...
返回以斜杠分割的字符串,表示组件的xtype层次。 全部可用的xtypes列表,可参考{@link Ext.Component}开头,用法举例:
参数项:
|
Component | |
fireEvent
(
String eventName,
Object... args
)
: Boolean
触发指定的事件,并将欲执行的处理函数的参数传入。(应该至少要有事件的...
触发指定的事件,并将欲执行的处理函数的参数传入。(应该至少要有事件的名称)
参数项:
|
Observable | |
addListener
(
String eventName,
Function handler,
[Object scope],
[Object options]
)
为该组件加入事件处理函数(event handler)
sc...
为该组件加入事件处理函数(event handler)
处理函数执行时所在的作用域。处理函数“this”的上下文。 触发事件后开始执行处理函数的延时时间(invocation:the act of making a particular function start),单位:毫秒 true代表为下次事件触发加入一个要处理的处理函数,然后再移除本身。 不同配搭方式的选项 一次调用加入上多个处理函数(handlers) 或者是以简写的方式书写,前提是只允许同一个的作用域对象传入到所有的处理函数中:
参数项:
|
Observable | |
removeListener
(
String eventName,
Function handler,
[Object scope]
)
移除侦听器
移除侦听器
参数项:
|
Observable | |
|
purgeListeners
(
)
从这个对象身上移除所有的侦听器
从这个对象身上移除所有的侦听器
参数项:
|
Observable | |
addEvents
(
Object object
)
定义观察者的事件。
定义观察者的事件。
参数项:
|
Observable | |
hasListener
(
String eventName
)
: Boolean
查询该对象是否有指定事件的侦听器
查询该对象是否有指定事件的侦听器
参数项:
|
Observable | |
|
suspendEvents
(
)
暂停触发所有的事件(参阅#resumeEvents)
暂停触发所有的事件(参阅#resumeEvents)
参数项:
|
Observable | |
|
resumeEvents
(
)
重新触发事件(参阅{@link #suspendEvents})
重新触发事件(参阅{@link #suspendEvents})
参数项:
|
Observable | |
on
(
String eventName,
[Object scope],
Function handler,
[Object options]
)
为该元素添加事件处理函数(event handler),addLis...
为该元素添加事件处理函数(event handler),addListener的简写方式 @param {String} eventName 侦听事件的类型 @param {Object} scope (可选的) 执行处理函数的作用域 @param {Function} handler 事件涉及的方法 @param {Object} options (可选的)
参数项:
|
Observable | |
un
(
String eventName,
Function handler,
[Object scope]
)
移除侦听器 @param {String} eventName ...
移除侦听器 @param {String} eventName 侦听事件的类型 @param {Function} handler 事件涉及的方法 @param {Object} scope (可选的)处理函数的作用域
参数项:
|
Observable | |
capture
(
Observable o,
Function fn,
[Object scope]
)
开始捕捉特定的观察者。 在事件触发之前,所有的事件会以“事件名称+标...
开始捕捉特定的观察者。 在事件触发之前,所有的事件会以“事件名称+标准签名”的形式传入到函数(传入的参数是function类型)。 如果传入的函数执行后返回false,则接下的事件将不会触发。 @param {Observable} o 要捕捉的观察者 @param {Function} fn 要调用的函数 @param {Object} scope (可选的)函数作用域
参数项:
|
Observable | |
releaseCapture
(
Observable o
)
从Observable身上移除所有已加入的捕捉captures。 @...
从Observable身上移除所有已加入的捕捉captures。 @param {Observable} o 要释放的观察者
参数项:
|
Observable | |
| 事件 | 定义者 | |
|---|---|---|
expand
(
Ext.form.ComboBox combo
)
Fires when the dropdown list is e...
Fires when the dropdown list is expanded
参数项:
|
ComboBox | |
collapse
(
Ext.form.ComboBox combo
)
Fires when the dropdown list is c...
Fires when the dropdown list is collapsed
参数项:
|
ComboBox | |
beforeselect
(
Ext.form.ComboBox combo,
Ext.data.Record record,
Number index
)
Fires before a list item is selec...
Fires before a list item is selected. Return false to cancel the selection.
参数项:
|
ComboBox | |
select
(
Ext.form.ComboBox combo,
Ext.data.Record record,
Number index
)
Fires when a list item is selecte...
Fires when a list item is selected
参数项:
|
ComboBox | |
beforequery
(
Object queryEvent
)
Fires before all queries are proc...
Fires before all queries are processed. Return false to cancel the query or set the queryEvent's cancel property to true.
combo : Ext.form.ComboBox This combo box query : String The query forceAll : Boolean True to force "all" query cancel : Boolean Set to true to cancel the query
参数项:
|
ComboBox | |
autosize
(
Ext.form.Field this,
Number width
)
Fires when the autosize function ...
Fires when the autosize function is triggered. The field may or may not have actually changed size according to the default logic, but this event provides a hook for the developer to apply additional logic at runtime to resize the field if needed. 当autosize函数调用时触发。根据缺省的逻辑,字段有可能不会真正地改变大小,但该事件的目的至于,允许开发人员在运行时加入额外的逻辑,以备调整输入字段的大小。
参数项:
|
TextField | |
keydown
(
Ext.form.TextField this,
Ext.EventObject e
)
Keydown input field event. This e...
Keydown input field event. This event only fires if enableKeyEvents is set to true. 输入字段键盘下降时的事件。该事件只会在enableKeyEvents为true时有效。
参数项:
|
TextField | |
keyup
(
Ext.form.TextField this,
Ext.EventObject e
)
Keyup input field event. This eve...
Keyup input field event. This event only fires if enableKeyEvents is set to true. 输入字段键盘升起时的事件。该事件只会在enableKeyEvents为true时有效。
参数项:
|
TextField | |
keypress
(
Ext.form.TextField this,
Ext.EventObject e
)
Keypress input field event. This ...
Keypress input field event. This event only fires if enableKeyEvents is set to true. 输入字段键盘按下时的事件。该事件只会在enableKeyEvents为true时有效。
参数项:
|
TextField | |
focus
(
Ext.form.Field this
)
当此元素获取焦点时激发此事件。
当此元素获取焦点时激发此事件。
参数项:
|
Field | |
blur
(
Ext.form.Field this
)
当此元素推动焦点时激发此事件。
当此元素推动焦点时激发此事件。
参数项:
|
Field | |
specialkey
(
Ext.form.Field this,
Ext.EventObject e
)
任何一个关于导航类键(arrows,tab,enter,esc等)...
任何一个关于导航类键(arrows,tab,enter,esc等)被敲击则触发此事件。你可以查看Ext.EventObject#getKey去断定哪个键被敲击。
参数项:
|
Field | |
change
(
Ext.form.Field this,
Mixed newValue,
Mixed oldValue
)
当元素失去焦点时,如果值被修改则触发此事件。
当元素失去焦点时,如果值被修改则触发此事件。
参数项:
|
Field | |
invalid
(
Ext.form.Field this,
String msg
)
当此元素被标为无效后触发此事件。
当此元素被标为无效后触发此事件。
参数项:
|
Field | |
valid
(
Ext.form.Field this
)
在此元素被验证有效后触发此事件。
在此元素被验证有效后触发此事件。
参数项:
|
Field | |
resize
(
Ext.Component this,
Number adjWidth,
Number adjHeight,
Number rawWidth,
Number rawHeight
)
当组件调节过大小后触发。
当组件调节过大小后触发。
参数项:
|
BoxComponent | |
move
(
Ext.Component this,
Number x,
Number y
)
当组件被移动过之后触发。
当组件被移动过之后触发。
参数项:
|
BoxComponent | |
disable
(
Ext.Component this
)
当组件禁用后触发。
当组件禁用后触发。
参数项:
|
Component | |
enable
(
Ext.Component this
)
当组件启用后触发。
当组件启用后触发。
参数项:
|
Component | |
beforeshow
(
Ext.Component this
)
当组件显示出来之前触发。如返回false则阻止显示。
当组件显示出来之前触发。如返回false则阻止显示。
参数项:
|
Component | |
show
(
Ext.Component this
)
当组件显示后触发。
当组件显示后触发。
参数项:
|
Component | |
beforehide
(
Ext.Component this
)
当组件将要隐藏的时候触发。如返回false则阻止隐藏。
当组件将要隐藏的时候触发。如返回false则阻止隐藏。
参数项:
|
Component | |
hide
(
Ext.Component this
)
当组件隐藏后触发。
当组件隐藏后触发。
参数项:
|
Component | |
beforerender
(
Ext.Component this
)
当组件渲染之前触发。如返回false则阻止渲染。
当组件渲染之前触发。如返回false则阻止渲染。
参数项:
|
Component | |
render
(
Ext.Component this
)
组件渲染之后触发。
组件渲染之后触发。
参数项:
|
Component | |
beforedestroy
(
Ext.Component this
)
组件销毁之前触发。如返回false则停止销毁。
组件销毁之前触发。如返回false则停止销毁。
参数项:
|
Component | |
destroy
(
Ext.Component this
)
组件销毁之后触发。
组件销毁之后触发。
参数项:
|
Component | |
beforestaterestore
(
Ext.Component this,
Object state
)
当组件的状态复原之前触发。如返回false则停止复原状态。
当组件的状态复原之前触发。如返回false则停止复原状态。
参数项:
|
Component | |
staterestore
(
Ext.Component this,
Object state
)
当组件的状态复原后触发。
当组件的状态复原后触发。
参数项:
|
Component | |
beforestatesave
(
Ext.Component this,
Object state
)
当组件的状态被保存到state provider之前触发。如返回f...
当组件的状态被保存到state provider之前触发。如返回false则停止保存。
参数项:
|
Component | |
statesave
(
Ext.Component this,
Object state
)
当组件的状态被保存到state provider后触发。
当组件的状态被保存到state provider后触发。
参数项:
|
Component | |