|
| allowDomMove : Boolean Whether the component can move the Dom node when rendering (defaults to true). | Component |
| anchor : StringNote: this config is only used when this Component is rendered
by a Container which has been configured to use an Anc... Note: this config is only used when this Component is rendered
by a Container which has been configured to use an AnchorLayout (or subclass thereof).
based layout manager, for example:
@@ -23,102 +27,11 @@ element's parent node will automatically be used as the component's container.
element spec. Used to create the Element which will encapsulate this ... A DomHelper element spec, or true for a default
element spec. Used to create the Element which will encapsulate this Component.
See autoEl for details. Defaults to:
- {tag: 'input', type: 'text', size: '20', autocomplete: 'off'}
| Field |
| autoEl : MixedA tag name or DomHelper spec used to create the Element which will
-encapsulate this Component.
-You do not normally ne... A tag name or DomHelper spec used to create the Element which will
-encapsulate this Component.
- You do not normally need to specify this. For the base classes Ext.Component, Ext.BoxComponent,
-and Ext.Container, this defaults to 'div'. The more complex Ext classes use a more complex
-DOM structure created by their own onRender methods.
- This is intended to allow the developer to create application-specific utility Components encapsulated by
-different DOM elements. Example usage: {
- xtype: 'box',
- autoEl: {
- tag: 'img',
- src: 'http://www.example.com/example.jpg'
- }
-}, {
- xtype: 'box',
- autoEl: {
- tag: 'blockquote',
- html: 'autoEl is cool!'
- }
-}, {
- xtype: 'container',
- autoEl: 'ul',
- cls: 'ux-unordered-list',
- items: {
- xtype: 'box',
- autoEl: 'li',
- html: 'First list item'
- }
-}
| Component |
| autoHeight : BooleanTrue to use height:'auto', false to use fixed height (or allow it to be managed by its parent
-Container's layout mana... True to use height:'auto', false to use fixed height (or allow it to be managed by its parent
-Container's layout manager. Defaults to false.
- Note: Although many components inherit this config option, not all will
-function as expected with a height of 'auto'. Setting autoHeight:true means that the
-browser will manage height based on the element's contents, and that Ext will not manage it at all.
- If the browser is managing the height, be aware that resizes performed by the browser in response
-to changes within the structure of the Component cannot be detected. Therefore changes to the height might
-result in elements needing to be synchronized with the new height. Example: var w = new Ext.Window({
- title: 'Window',
- width: 600,
- autoHeight: true,
- items: {
- title: 'Collapse Me',
- height: 400,
- collapsible: true,
- border: false,
- listeners: {
- beforecollapse: function() {
- w.el.shadow.hide();
- },
- beforeexpand: function() {
- w.el.shadow.hide();
- },
- collapse: function() {
- w.syncShadow();
- },
- expand: function() {
- w.syncShadow();
- }
- }
- }
-}).show();
| BoxComponent |
| autoScroll : Booleantrue to use overflow:'auto' on the components layout element and show scroll bars automatically when
+ {tag: 'input', type: 'text', size: '20', autocomplete: 'off'}
| Field |
| autoScroll : Booleantrue to use overflow:'auto' on the components layout element and show scroll bars automatically when
necessary, false... true to use overflow:'auto' on the components layout element and show scroll bars automatically when
necessary, false to clip any overflowing content (defaults to false ).
| BoxComponent |
| autoShow : BooleanTrue if the component should check for hidden classes (e.g. 'x-hidden' or 'x-hide-display') and remove
them on render... True if the component should check for hidden classes (e.g. 'x-hidden' or 'x-hide-display') and remove
-them on render (defaults to false). | Component |
| autoWidth : BooleanTrue to use width:'auto', false to use fixed width (or allow it to be managed by its parent
-Container's layout manage... True to use width:'auto', false to use fixed width (or allow it to be managed by its parent
-Container's layout manager. Defaults to false.
- Note: Although many components inherit this config option, not all will
-function as expected with a width of 'auto'. Setting autoWidth:true means that the
-browser will manage width based on the element's contents, and that Ext will not manage it at all.
- If the browser is managing the width, be aware that resizes performed by the browser in response
-to changes within the structure of the Component cannot be detected. Therefore changes to the width might
-result in elements needing to be synchronized with the new width. For example, where the target element is: <div id='grid-container' style='margin-left:25%;width:50%'></div>
-A Panel rendered into that target element must listen for browser window resize in order to relay its
-child items when the browser changes its width: var myPanel = new Ext.Panel({
- renderTo: 'grid-container',
- monitorResize: true, // relay on browser resize
- title: 'Panel',
- height: 400,
- autoWidth: true,
- layout: 'hbox',
- layoutConfig: {
- align: 'stretch'
- },
- defaults: {
- flex: 1
- },
- items: [{
- title: 'Box 1',
- }, {
- title: 'Box 2'
- }, {
- title: 'Box 3'
- }],
-});
| BoxComponent |
| boxMaxHeight : NumberThe maximum value in pixels which this BoxComponent will set its height to.
+them on render (defaults to false). | Component |
| boxMaxHeight : NumberThe maximum value in pixels which this BoxComponent will set its height to.
Warning: This will override any size mana... The maximum value in pixels which this BoxComponent will set its height to.
Warning: This will override any size management applied by layout managers. | BoxComponent |
| boxMaxWidth : NumberThe maximum value in pixels which this BoxComponent will set its width to.
Warning: This will override any size manag... The maximum value in pixels which this BoxComponent will set its width to.
@@ -126,7 +39,10 @@ Warning: This will override any size manag... The maxi
Warning: This will override any size mana... The minimum value in pixels which this BoxComponent will set its height to.
Warning: This will override any size management applied by layout managers. | BoxComponent |
| boxMinWidth : NumberThe minimum value in pixels which this BoxComponent will set its width to.
Warning: This will override any size manag... The minimum value in pixels which this BoxComponent will set its width to.
- Warning: This will override any size management applied by layout managers. | BoxComponent |
| clearCls : StringThe CSS class used to to apply to the special clearing div rendered
+ Warning: This will override any size management applied by layout managers. | BoxComponent |
| bubbleEvents : ArrayAn array of events that, when fired, should be bubbled to any parent container.
+See Ext.util.Observable.enableBubble.... | Component |
| clearCls : StringThe CSS class used to to apply to the special clearing div rendered
directly after each form field wrapper to provide... The CSS class used to to apply to the special clearing div rendered
directly after each form field wrapper to provide field clearing (defaults to
'x-form-clear-left').
@@ -409,9 +325,9 @@ to the second, and the bottom is set to the third.
If there are four values, they apply to the top, right, bottom, and left, respectively.
Defaults to: {top:0, right:0, bottom:0, left:0}
| BoxComponent |
| msgFx : String Experimental The effect used when displaying a validation message under the field
-(defaults to 'normal'). | Field |
| msgTarget<p>The : Stringlocation where the message text set through markInvalid should display.
+(defaults to 'normal'). | Field |
| msgTarget : StringThe location where the message text set through markInvalid should display.
Must be one of the following values:
-<div cla... location where the message text set through markInvalid should display.
+<div... The location where the message text set through markInvalid should display.
Must be one of the following values:
qtip Display a quick tip containing the message when the user hovers over the field. This is the default.
@@ -420,7 +336,7 @@ Must be one of the following values:
under Add a block div beneath the field containing the error message.
side Add an error icon to the right of the field, displaying the message in a popup on hover.
[element id] Add the error message directly to the innerHTML of the specified element.
- | Field |
| name : StringThe field's HTML name attribute (defaults to '').
+ | Field |
| name : StringThe field's HTML name attribute (defaults to '').
Note: this property must be set if this field is to be automaticall... The field's HTML name attribute (defaults to '').
Note: this property must be set if this field is to be automatically included with
form submit(). | Field |
| overCls : StringAn optional extra CSS class that will be added to this component's Element when the mouse moves
@@ -681,7 +597,12 @@ Or a shorthand syntax:
scope: this
}); Returns: | Observable |
| applyToMarkup( String/HTMLElement el )
:
- voidApply this component to existing markup that is valid. With this function, no call to render() is required. Apply this component to existing markup that is valid. With this function, no call to render() is required. | Component |
| clearInvalid()
+ voidApply this component to existing markup that is valid. With this function, no call to render() is required. Apply this component to existing markup that is valid. With this function, no call to render() is required. | Component |
| bubble( Function fn , [Object scope ], [Array args ] )
+ :
+ Ext.ComponentBubbles up the component/container heirarchy, calling the specified function with each component. The scope (this) of... Bubbles up the component/container heirarchy, calling the specified function with each component. The scope ( this) of
+function call will be the scope provided or the current component. The arguments to the function
+will be the args provided or the current component. If the function returns false at any point,
+the bubble is stopped. | Component |
| clearInvalid()
:
voidClear any invalid styles/messages for this field Clear any invalid styles/messages for this field | Field |
| cloneConfig( Object overrides )
:
@@ -698,45 +619,47 @@ should usually not need to be called directly.Enable this component and fire the 'enable' event. Enable this component and fire the 'enable' event. | Component |
| enableBubble( String/Array events )
:
- voidEnables events fired by this Observable to bubble up an owner hierarchy by calling
-this.getBubbleTarget() if present... Enables events fired by this Observable to bubble up an owner hierarchy by calling
-this.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
-implementation in Ext.Component returns the Component's immediate owner. But if a known target is required, this can be overridden to
-access the required target more quickly.
- Example: Ext.override(Ext.form.Field, {
- // Add functionality to Field's initComponent to enable the change event to bubble
- initComponent : Ext.form.Field.prototype.initComponent.createSequence(function() {
- this.enableBubble('change');
- }),
-
- // We know that we want Field's events to bubble directly to the FormPanel.
- getBubbleTarget : function() {
- if (!this.formPanel) {
- this.formPanel = this.findParentByType('form');
- }
- return this.formPanel;
- }
-});
-
-var myForm = new Ext.formPanel({
- title: 'User Details',
- items: [{
- ...
- }],
- listeners: {
- change: function() {
- // Title goes red if form has been modified.
- myForm.header.setStyle('color', 'red');
- }
- }
+ voidEnables events fired by this Observable to bubble up an owner hierarchy by calling
+this.getBubbleTarget() if present.... Enables events fired by this Observable to bubble up an owner hierarchy by calling
+this.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
+implementation in Ext.Component returns the Component's immediate owner. But if a known target is required, this can be overridden to
+access the required target more quickly.
+ Example: Ext.override(Ext.form.Field, {
+ // Add functionality to Field's initComponent to enable the change event to bubble
+ initComponent : Ext.form.Field.prototype.initComponent.createSequence(function() {
+ this.enableBubble('change');
+ }),
+
+ // We know that we want Field's events to bubble directly to the FormPanel.
+ getBubbleTarget : function() {
+ if (!this.formPanel) {
+ this.formPanel = this.findParentByType('form');
+ }
+ return this.formPanel;
+ }
+});
+
+var myForm = new Ext.formPanel({
+ title: 'User Details',
+ items: [{
+ ...
+ }],
+ listeners: {
+ change: function() {
+ // Title goes red if form has been modified.
+ myForm.header.setStyle('color', 'red');
+ }
+ }
});
| Observable |
| findParentBy( Function fn )
:
Ext.ContainerFind a container above this component at any level by a custom function. If the passed function returns
true, the con... Find a container above this component at any level by a custom function. If the passed function returns
-true, the container will be returned. | Component |
| findParentByType( String/Class xtype )
+true, the container will be returned. | Component |
| findParentByType( String/Ext.Component/Class xtype , [Boolean shallow ] )
:
- Ext.ContainerFind a container above this component at any level by xtype or class Find a container above this component at any level by xtype or class | Component |
| fireEvent( String eventName , Object... args )
+ Ext.ContainerFind a container above this component at any level by xtype or class Find a container above this component at any level by xtype or class Parameters:xtype : String/Ext.Component/ClassThe xtype to check for this Component. Note that the the component can either be an instance
+or a component class: shallow : Boolean(optional) False to check whether this Component is descended from the xtype (this is
+the default), or true to check whether this Component is directly of the specified xtype. Returns: | Component |
| fireEvent( String eventName , Object... args )
:
BooleanFires the specified event with the passed parameters (minus the event name).
An event may be set to bubble up an Obse... Fires the specified event with the passed parameters (minus the event name).
@@ -767,7 +690,12 @@ or use a render listener directly: new Ext.Panel({
},
single: true // Remove the listener after first invocation
}
-});
| Component |
| getHeight()
+}); | Component |
| getErrors()
+ :
+ ArrayRuns this field's validators and returns an array of error messages for any validation failures.
+This is called inter... Runs this field's validators and returns an array of error messages for any validation failures.
+This is called internally during validation and would not usually need to be used manually.
+Each subclass should override or augment the return value to provide their own errors | Field |
| getHeight()
:
NumberGets the current height of the component's underlying element. Gets the current height of the component's underlying element. | BoxComponent |
| getId()
:
@@ -845,7 +773,7 @@ of the field. Note: disab... | Field |
| isVisible()
:
- BooleanReturns true if this component is visible. Returns true if this component is visible. | Component |
| isXType( String xtype , [Boolean shallow ] )
+ BooleanReturns true if this component is visible. Returns true if this component is visible. | Component |
| isXType( String/Ext.Component/Class xtype , [Boolean shallow ] )
:
BooleanTests whether or not this Component is of a specific xtype. This can test whether this Component is descended
from th... Tests whether or not this Component is of a specific xtype. This can test whether this Component is descended
@@ -857,7 +785,11 @@ to participate in determination of inherited xtypes.
var t = new Ext.form.TextField();
var isText = t.isXType('textfield'); // true
var isBoxSubclass = t.isXType('box'); // true, descended from BoxComponent
-var isBoxInstance = t.isXType('box', true); // false, not a direct BoxComponent instance
| Component |
| markInvalid( [String msg ] )
:
voidResume firing events. (see suspendEvents)
If events were suspended using the queueSuspended parameter, then all
-events fired during event suspension will be sent to any listeners now. | Observable |
| setAutoScroll( Boolean scroll )
+events fired during event suspension will be sent to any listeners now. | Observable |
| setActiveError( String msg , Boolean suppressEvent )
+ :
+ voidSets the current activeError to the given string. Fires the 'invalid' event.
+This does not set up the error icon, onl... Sets the current activeError to the given string. Fires the 'invalid' event.
+This does not set up the error icon, only sets the message and fires the event. To show the error icon,
+use markInvalid instead, which calls this method internally | Field |
| setAutoScroll( Boolean scroll )
:
Ext.BoxComponentSets the overflow on the content element of the component. Sets the overflow on the content element of the component. | BoxComponent |
| setDisabled( Boolean disabled )
:
- Ext.ComponentConvenience function for setting disabled/enabled by boolean. Convenience function for setting disabled/enabled by boolean. | Component |
| setHeight( Number height )
+ Ext.ComponentConvenience function for setting disabled/enabled by boolean. Convenience function for setting disabled/enabled by boolean. | Component |
| setHeight( Mixed height )
:
- Ext.BoxComponentSets the height of the component. This method fires the resize event. Sets the height of the component. This method fires the resize event. Parameters:height : NumberThe new height to set. This may be one of:
| BoxComponent |
| setPagePosition( Number x , Number y )
@@ -980,10 +917,10 @@ This may be one of: | Field |
| setVisible( Boolean visible )
:
- Ext.ComponentConvenience function to hide or show this component by boolean. Convenience function to hide or show this component by boolean. | Component |
| setWidth( Number width )
+ Ext.ComponentConvenience function to hide or show this component by boolean. Convenience function to hide or show this component by boolean. | Component |
| setWidth( Mixed width )
:
- Ext.BoxComponentSets the width of the component. This method fires the resize event. Sets the width of the component. This method fires the resize event. Parameters:width : NumberThe new width to setThis may be one of:
| BoxComponent |
| show()
:
@@ -997,7 +934,11 @@ after the Force the component's size to recalculate based on the underlying element's current height and width. Force the component's size to recalculate based on the underlying element's current height and width. | BoxComponent |
| un( String eventName , Function handler , [Object scope ] )
:
- voidRemoves an event handler (shorthand for removeListener.) | Observable |
| update( Mixed htmlOrData , [Boolean loadScripts ], [Function callback ] )
+ voidRemoves an event handler (shorthand for removeListener.) | Observable |
| unsetActiveError( Boolean suppressEvent )
+ :
+ voidClears the activeError and fires the 'valid' event. This is called internally by clearInvalid and would not
+usually n... Clears the activeError and fires the 'valid' event. This is called internally by clearInvalid and would not
+usually need to be called manually | Field |
| update( Mixed htmlOrData , [Boolean loadScripts ], [Function callback ] )
:
voidUpdate the content area of a component. Update the content area of a component. Parameters:htmlOrData : MixedIf this component has been configured with a template via the tpl config
then it will use this argument as data to populate the template.
@@ -1006,7 +947,13 @@ content area will be updated via Ext.Element update loadScri
:
Ext.BoxComponentSets the current box measurements of the component's underlying element. Sets the current box measurements of the component's underlying element.
| BoxComponent |
| validate()
:
- BooleanValidates the field value Validates the field value | Field |