X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/2e847cf21b8ab9d15fa167b315ca5b2fa92638fc..0494b8d9b9bb03ab6c22b34dae81261e3cd7e3e6:/docs/output/Ext.form.ComboBox.html diff --git a/docs/output/Ext.form.ComboBox.html b/docs/output/Ext.form.ComboBox.html index 835a033c..888f930f 100644 --- a/docs/output/Ext.form.ComboBox.html +++ b/docs/output/Ext.form.ComboBox.html @@ -1,4 +1,10 @@ -
Observable
  Component
    BoxComponent
      Field
        TextField
          TriggerField
            ComboBox

Class Ext.form.ComboBox

Package:Ext.form
Defined In:Combo.js
Class:ComboBox
Subclasses:TimeField
Extends:TriggerField

A combobox control with support for autocomplete, remote-loading, paging and many other features.

+

Class Ext.form.ComboBox

Package:Ext.form
Defined In:Combo.js
Class:ComboBox
Subclasses:TimeField
Extends:TriggerField

A combobox control with support for autocomplete, remote-loading, paging and many other features.

A ComboBox works in a similar manner to a traditional HTML <select> field. The difference is that to submit the valueField, you must specify a hiddenName to create a hidden input field to hold the value of the valueField. The displayField is shown in the text field @@ -85,105 +91,14 @@ element's parent node will automatically be used as the component's container.

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: "24", autocomplete: "off"}
ComboBox autoEl : Mixed
A 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 : Boolean
True 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 : Boolean
true to use overflow:'auto' on the components layout element and show scroll bars automatically when +
{tag: "input", type: "text", size: "24", autocomplete: "off"}
ComboBox autoScroll : Boolean
true 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 autoSelect : Boolean
true to select the first result gathered by the data store (defaults to true). A false value would require a manual ...
true to select the first result gathered by the data store (defaults to true). A false value would require a manual selection from the dropdown list to set the components value unless the value of (typeAheadDelay) were true.
ComboBox autoShow : Boolean
True 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 : Boolean
True 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 blankText : String
The error text to display if the allowBlank validation +them on render (defaults to false).
Component blankText : String
The error text to display if the allowBlank validation fails (defaults to 'This field is required')
TextField boxMaxHeight : Number
The 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 : Number
The maximum value in pixels which this BoxComponent will set its width to. @@ -192,7 +107,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 : Number
The 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 : String
The 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 : Array
An array of events that, when fired, should be bubbled to any parent container. +See Ext.util.Observable.enableBubble....

An array of events that, when fired, should be bubbled to any parent container. +See Ext.util.Observable.enableBubble. +Defaults to [].

Component clearCls : String
The 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').

@@ -276,17 +194,12 @@ false to allow the user to set arbitrary text i...
tr Note to express this dimension as a percentage or offset s...
The height of this component in pixels (defaults to auto). Note to express this dimension as a percentage or offset see Ext.Component.anchor.
BoxComponent hidden : Boolean
Render this component hidden (default is false). If true, the hide method will be called internally.
Component hiddenId : String
If hiddenName is specified, hiddenId can also be provided -to give the hidden field a unique id (defaults to the hidde...
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 hiddenName : String
If specified, a hidden form field with this name is dynamically generated to store the +to give the hidden field a unique id. The hiddenId and com...
If hiddenName is specified, hiddenId can also be provided +to give the hidden field a unique id. The hiddenId and combo id should be +different, since no two DOM nodes should share the same id.
ComboBox hiddenName : String
If specified, a hidden form field with this name is dynamically generated to store the field's data value (defaults t...
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. See also valueField. -

Note: the hidden field's id will also default to this name if hiddenId is not specified. -The ComboBox id and the hiddenId should be different, since -no two DOM nodes should share the same id. So, if the ComboBox name and -hiddenName are the same, you should specify a unique hiddenId.

ComboBox hiddenValue : String
Sets the initial value of the hidden field if hiddenName is +post during a form submission. See also valueField.
ComboBox hiddenValue : String
Sets the initial value of the hidden field if hiddenName is specified to contain the selected valueField, from the St...
Sets the initial value of the hidden field if hiddenName is specified to contain the selected valueField, from the Store. Defaults to the configured value.
ComboBox hideLabel : Boolean
true to completely hide the label element @@ -584,9 +497,9 @@ clicked, set to 'local' and manually load the store. To force a requer triggerAction: 'all' });
ComboBox msgFx : String
Experimental The effect used when displaying a validation message under the field -(defaults to 'normal').
Field msgTarget<p>The : String
location where the message text set through markInvalid should display. +(defaults to 'normal').
Field msgTarget : String
The 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. @@ -595,7 +508,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 : String
The field's HTML name attribute (defaults to ''). +
Field name : String
The 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 : String
An optional extra CSS class that will be added to this component's Element when the mouse moves @@ -885,7 +798,20 @@ config for a suggestion, or use a render listener directly:

new
         single: true  // Remove the listener after first invocation
     }
 });
-

See also getEl

Component hidden : Boolean
True if this component is hidden. Read-only.
Component initialConfig : Object
This Component's initial configuration specification. Read-only.
Component label : Ext.Element
The label Element associated with this Field. Only available after this Field has been rendered by a +

See also getEl

Component hidden : Boolean
True if this component is hidden. Read-only.
Component initialConfig : Object
This Component's initial configuration specification. Read-only.
Component keyNav : Ext.KeyNav +<p>A {@link Ext.KeyNav KeyNav} object which handles navigation keys for this ComboBox. This performs actions +based on keystrokes typed when the input field is focused.</p> +<p><b>After the ComboBox has been rendered</b>, you may override existing navigation key functionality, +or add your own based upon key names as specified in the {@link Ext.KeyNav KeyNav} class.</p> +<p>The function is executed in the scope (<code>this</code> reference of the ComboBox. Example:</p><pre><code> +myCombo.keyNav.esc = function(e) { // Override ESC handling function + this.collapse(); // Standard behaviour of Ext's ComboBox. + this.setValue(this.startValue); // We reset to starting value on ESC +}; +myCombo.keyNav.tab = function() { // Override TAB handling function + this.onViewClick(false); // Select the currently highlighted row +}; +</code></pre>
ComboBox label : Ext.Element
The label Element associated with this Field. Only available after this Field has been rendered by a Ext.layout.FormL...

The label Element associated with this Field. Only available after this Field has been rendered by a Ext.layout.FormLayout layout manager.

Field lastQuery : String
The value of the match string used to filter the store. Delete this property to force a requery. Example use: @@ -981,7 +907,12 @@ Or a shorthand syntax:
scope: this });
Returns:
  • void
Observable applyToMarkupString/HTMLElement el ) : - void
Apply 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.
Parameters:
  • el : String/HTMLElement
Returns:
  • void
Component clearInvalid() + void
Apply 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.
Parameters:
  • el : String/HTMLElement
Returns:
  • void
Component bubbleFunction fn[Object scope][Array args] ) + : + Ext.Component
Bubbles 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.
Parameters:
  • fn : Function
    The function to call
  • scope : Object
    (optional) The scope of the function (defaults to current node)
  • args : Array
    (optional) The args to call the function with (default to passing the current component)
Returns:
  • Ext.Component
    this
Component clearInvalid() : void
Clear any invalid styles/messages for this field
Clear any invalid styles/messages for this field
Parameters:
  • None.
Returns:
  • void
Field clearValue() : @@ -1008,47 +939,49 @@ also clears any filter previously saved in the current store (defaults to fa : Ext.Component
Enable this component and fire the 'enable' event.
Enable this component and fire the 'enable' event.
Parameters:
  • None.
Returns:
  • Ext.Component
    this
Component enableBubbleString/Array events ) : - void
Enables 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');
-        }
-    }
+                                        void
Enables 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');
+        }
+    }
 });
Parameters:
  • events : String/Array
    The event name to bubble, or an Array of event names.
Returns:
  • void
Observable expand() : void
Expands the dropdown list if it is currently hidden. Fires the expand event on completion.
Expands the dropdown list if it is currently hidden. Fires the expand event on completion.
Parameters:
  • None.
Returns:
  • void
ComboBox findParentByFunction fn ) : Ext.Container
Find 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.
Parameters:
  • fn : Function
    The custom function to call with the arguments (container, this component).
Returns:
  • Ext.Container
    The first Container for which the custom function returns true
Component findParentByTypeString/Class xtype ) +true, the container will be returned.
Parameters:
  • fn : Function
    The custom function to call with the arguments (container, this component).
Returns:
  • Ext.Container
    The first Container for which the custom function returns true
Component findParentByTypeString/Ext.Component/Class xtype[Boolean shallow] ) : - Ext.Container
Find 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/Class
    The xtype string for a component, or the class of the component directly
Returns:
  • Ext.Container
    The first Container which matches the given xtype or class
Component fireEventString eventNameObject... args ) + Ext.Container
Find 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/Class
    The 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:
  • Ext.Container
    The first Container which matches the given xtype or class
Component fireEventString eventNameObject... args ) : Boolean
Fires 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).

@@ -1079,7 +1012,63 @@ or use a render listener directly:

new Ext.Panel({
         },
         single: true  // Remove the listener after first invocation
     }
-});
Parameters:
  • None.
Returns:
  • Ext.Element
    The Element which encapsulates this Component.
Component getHeight() +});
Parameters:
  • None.
Returns:
  • Ext.Element
    The Element which encapsulates this Component.
Component getErrorsMixed value ) + : + Array
Validates a value according to the field's validation rules and returns an array of errors +for any failing validation...

Validates a value according to the field's validation rules and returns an array of errors +for any failing validations. Validation rules are processed in the following order:

+
    +
  • 1. Field specific validator +
    +

    A validator offers a way to customize and reuse a validation specification. +If a field is configured with a validator +function, it will be passed the current field value. The validator +function is expected to return either: +

      +
    • Boolean true if the value is valid (validation continues).
    • +
    • a String to represent the invalid message if invalid (validation halts).
    • +
    +
  • +
  • 2. Basic Validation +
    +

    If the validator has not halted validation, +basic validation proceeds as follows:

    +
      +
    • allowBlank : (Invalid message = +emptyText)
      +Depending on the configuration of allowBlank, a +blank field will cause validation to halt at this step and return +Boolean true or false accordingly. +
    • +
    • minLength : (Invalid message = +minLengthText)
      +If the passed value does not satisfy the minLength +specified, validation halts. +
    • +
    • maxLength : (Invalid message = +maxLengthText)
      +If the passed value does not satisfy the maxLength +specified, validation halts. +
    • +
    +
  • +
  • 3. Preconfigured Validation Types (VTypes) +
    +

    If none of the prior validation steps halts validation, a field +configured with a vtype will utilize the +corresponding VTypes validation function. +If invalid, either the field's vtypeText or +the VTypes vtype Text property will be used for the invalid message. +Keystrokes on the field will be filtered according to the VTypes +vtype Mask property.

    +
  • +
  • 4. Field specific regex test +
    +

    If none of the prior validation steps halts validation, a field's +configured regex test will be processed. +The invalid message for this test is configured with +regexText.

    +
  • Parameters:
    • value : Mixed
      The value to validate. The processed raw value will be used if nothing is passed
    Returns:
    • Array
      Array of any validation errors
TextField getHeight() : Number
Gets the current height of the component's underlying element.
Gets the current height of the component's underlying element.
Parameters:
  • None.
Returns:
  • Number
BoxComponent getId() : @@ -1197,7 +1186,7 @@ of the field. Note: disab...
Returns whether or not the f validating the processed value of the field. Note: disabled fields are ignored.
Parameters:
  • preventMark : Boolean
    True to disable marking the field invalid
Returns:
  • Boolean
    True if the value is valid, else false
Field isVisible() : - Boolean
Returns true if this component is visible.
Returns true if this component is visible.
Parameters:
  • None.
Returns:
  • Boolean
    True if this component is visible, false otherwise.
Component isXTypeString xtype[Boolean shallow] ) + Boolean
Returns true if this component is visible.
Returns true if this component is visible.
Parameters:
  • None.
Returns:
  • Boolean
    True if this component is visible, false otherwise.
Component isXTypeString/Ext.Component/Class xtype[Boolean shallow] ) : Boolean
Tests 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 @@ -1209,7 +1198,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
Parameters:
  • xtype : String
    The xtype to check for this Component
  • shallow : Boolean
    (optional) False to check whether this Component is descended from the xtype (this is +var isBoxInstance = t.isXType('box', true); // false, not a direct BoxComponent instance
    Parameters:
    • xtype : String/Ext.Component/Class
      The xtype to check for this Component. Note that the the component can either be an instance +or a component class: +
      var c = new Ext.Component();
      +console.log(c.isXType(c));
      +console.log(c.isXType(Ext.Component));
    • 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:
    • Boolean
      True if this component descends from the specified xtype, false otherwise.
Component markInvalid[String msg] ) : void
Display an error message associated with this field, using msgTarget to determine how to @@ -1304,23 +1297,30 @@ The sto...
Select an item in the dropdown list by its dat The store must be loaded and the list expanded for this function to work, otherwise use setValue.
Parameters:
  • value : String
    The data value of the item to select
  • scrollIntoView : Boolean
    False to prevent the dropdown list from autoscrolling to display the selected item if it is not currently in view (defaults to true)
Returns:
  • Boolean
    True if the value matched an item in the list, else false
ComboBox selectText[Number start][Number end] ) : - void
Selects text in this field
Selects text in this field
Parameters:
  • start : Number
    (optional) The index where the selection should start (defaults to 0)
  • end : Number
    (optional) The index where the selection should end (defaults to the text length)
Returns:
  • void
TextField setAutoScrollBoolean scroll ) + void
Selects text in this field
Selects text in this field
Parameters:
  • start : Number
    (optional) The index where the selection should start (defaults to 0)
  • end : Number
    (optional) The index where the selection should end (defaults to the text length)
Returns:
  • void
TextField setActiveErrorString msgBoolean suppressEvent ) + : + void
Sets 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
Parameters:
  • msg : String
    The error message
  • suppressEvent : Boolean
    True to suppress the 'invalid' event from being fired
Returns:
  • void
Field setAutoScrollBoolean scroll ) : Ext.BoxComponent
Sets the overflow on the content element of the component.
Sets the overflow on the content element of the component.
Parameters:
  • scroll : Boolean
    True to allow the Component to auto scroll.
Returns:
  • Ext.BoxComponent
    this
BoxComponent setDisabledBoolean disabled ) : Ext.Component
Convenience function for setting disabled/enabled by boolean.
Convenience function for setting disabled/enabled by boolean.
Parameters:
  • disabled : Boolean
Returns:
  • Ext.Component
    this
Component setEditableBoolean value ) : - void
Parameters:
  • value : Boolean
    True to allow the user to directly edit the field text -Allow or prevent the user from directly editing the field text. If false is passed, + void
    Allow or prevent the user from directly editing the field text. If false is passed, +the user will only be able to mo...
    Allow or prevent the user from directly editing the field text. If false is passed, the user will only be able to modify the field using the trigger. Will also add a click event to the text field which will call the trigger. This method -is the runtime equivalent of setting the 'editable' config option at config time.
Returns:
  • void
TriggerField setHeightNumber height ) +is the runtime equivalent of setting the editable config option at config time.
Parameters:
  • value : Boolean
    True to allow the user to directly edit the field text.
Returns:
  • void
TriggerField setHeightMixed height ) : - Ext.BoxComponent
Sets 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 : Number
    The new height to set. This may be one of:
      -
    • A Number specifying the new height in the Element's Ext.Element.defaultUnits (by default, pixels).
    • + Ext.BoxComponent
      Sets 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 : Mixed
        The new height to set. This may be one of:
          +
        • A Number specifying the new height in the Element's defaultUnits (by default, pixels).
        • A String used to set the CSS height style.
        • undefined to leave the height unchanged.
        • -
      Returns:
      • Ext.BoxComponent
        this
      BoxComponent setPagePositionNumber xNumber y ) +
Returns:
  • Ext.BoxComponent
    this
BoxComponent setHideTriggerBoolean hideTrigger ) + : + void
Changes the hidden status of the trigger.
Changes the hidden status of the trigger.
Parameters:
  • hideTrigger : Boolean
    True to hide the trigger, false to show it.
Returns:
  • void
TriggerField setPagePositionNumber xNumber y ) : Ext.BoxComponent
Sets the page XY position of the component. To set the left and top instead, use setPosition. This method fires the ...
Sets the page XY position of the component. To set the left and top instead, use setPosition. @@ -1332,11 +1332,11 @@ This method fires the
Sets the underlying DOM field's value directly, bypassing validation. To set the value with validation see setValue.
Sets the underlying DOM field's value directly, bypassing validation. To set the value with validation see setValue.
Parameters:
  • value : Mixed
    The value to set
Returns:
  • Mixed
    value The field value that is set
Field setReadOnlyBoolean value ) : - void
Parameters:
  • value : Boolean
    True to prevent the user changing the field and explicitly -hide the trigger. -Setting this to true will superceed settings editable and hideTrigger. -Setting this to false will defer back to editable and hideTrigger. This method -is the runtime equivalent of setting the 'readOnly' config option at config time.
Returns:
  • void
TriggerField setSizeMixed widthMixed height ) + void
Setting this to true will supersede settings editable and hideTrigger. +Setting this to false will defer back to edita...
Setting this to true will supersede settings editable and hideTrigger. +Setting this to false will defer back to editable and hideTrigger. This method +is the runtime equivalent of setting the readOnly config option at config time.
Parameters:
  • value : Boolean
    True to prevent the user changing the field and explicitly +hide the trigger.
Returns:
  • void
TriggerField setSizeMixed widthMixed height ) : Ext.BoxComponent
Sets the width and height of this BoxComponent. This method fires the resize event. This method can accept either wid...
Sets the width and height of this BoxComponent. This method fires the resize event. This method can accept @@ -1358,10 +1358,10 @@ will be displayed in the field. If the value does not match the data value of a and the valueNotFoundText config option is defined, it will be displayed as the default field text. Otherwise the field will be blank (although the value will still be set).
Parameters:
  • value : String
    The value to match
Returns:
  • Ext.form.Field
    this
ComboBox setVisibleBoolean visible ) : - Ext.Component
Convenience function to hide or show this component by boolean.
Convenience function to hide or show this component by boolean.
Parameters:
  • visible : Boolean
    True to show, false to hide
Returns:
  • Ext.Component
    this
Component setWidthNumber width ) + Ext.Component
Convenience function to hide or show this component by boolean.
Convenience function to hide or show this component by boolean.
Parameters:
  • visible : Boolean
    True to show, false to hide
Returns:
  • Ext.Component
    this
Component setWidthMixed width ) : - Ext.BoxComponent
Sets 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 : Number
    The new width to setThis may be one of:
    BoxComponent unString eventNameFunction handler[Object scope] ) : - void
    Removes an event handler (shorthand for removeListener.)
    Removes an event handler (shorthand for removeListener.)
    Parameters:
    • eventName : String
      The type of event the handler was associated with.
    • handler : Function
      The handler to remove. This must be a reference to the function passed into the addListener call.
    • scope : Object
      (optional) The scope originally specified for the handler.
    Returns:
    • void
    Observable updateMixed htmlOrData[Boolean loadScripts][Function callback] ) + void
    Removes an event handler (shorthand for removeListener.)
    Removes an event handler (shorthand for removeListener.)
    Parameters:
    • eventName : String
      The type of event the handler was associated with.
    • handler : Function
      The handler to remove. This must be a reference to the function passed into the addListener call.
    • scope : Object
      (optional) The scope originally specified for the handler.
    Returns:
    • void
    Observable unsetActiveErrorBoolean suppressEvent ) + : + void
    Clears 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
    Parameters:
    • suppressEvent : Boolean
      True to suppress the 'invalid' event from being fired
    Returns:
    • void
    Field updateMixed htmlOrData[Boolean loadScripts][Function callback] ) : void
    Update the content area of a component.
    Update the content area of a component.
    Parameters:
    • htmlOrData : Mixed
      If this component has been configured with a template via the tpl config then it will use this argument as data to populate the template. @@ -1384,63 +1388,13 @@ content area will be updated via Ext.Element update
    • loadScri : Ext.BoxComponent
      Sets the current box measurements of the component's underlying element.
      Sets the current box measurements of the component's underlying element.
      Parameters:
      • box : Object
        An object in the format {x, y, width, height}
      Returns:
      • Ext.BoxComponent
        this
      BoxComponent validate() : - Boolean
      Validates the field value
      Validates the field value
      Parameters:
      • None.
      Returns:
      • Boolean
        True if the value is valid, else false
      Field validateValueMixed value ) + Boolean
      Validates the field value
      Validates the field value
      Parameters:
      • None.
      Returns:
      • Boolean
        True if the value is valid, else false
      Field validateValueMixed The ) : - Boolean
      Validates a value according to the field's validation rules and marks the field as invalid -if the validation fails. V...

      Validates a value according to the field's validation rules and marks the field as invalid -if the validation fails. Validation rules are processed in the following order:

      -
        -
      • 1. Field specific validator -
        -

        A validator offers a way to customize and reuse a validation specification. -If a field is configured with a validator -function, it will be passed the current field value. The validator -function is expected to return either: -

          -
        • Boolean true if the value is valid (validation continues).
        • -
        • a String to represent the invalid message if invalid (validation halts).
        • -
        -
      • -
      • 2. Basic Validation -
        -

        If the validator has not halted validation, -basic validation proceeds as follows:

        -
          -
        • allowBlank : (Invalid message = -emptyText)
          -Depending on the configuration of allowBlank, a -blank field will cause validation to halt at this step and return -Boolean true or false accordingly. -
        • -
        • minLength : (Invalid message = -minLengthText)
          -If the passed value does not satisfy the minLength -specified, validation halts. -
        • -
        • maxLength : (Invalid message = -maxLengthText)
          -If the passed value does not satisfy the maxLength -specified, validation halts. -
        • -
        -
      • -
      • 3. Preconfigured Validation Types (VTypes) -
        -

        If none of the prior validation steps halts validation, a field -configured with a vtype will utilize the -corresponding VTypes validation function. -If invalid, either the field's vtypeText or -the VTypes vtype Text property will be used for the invalid message. -Keystrokes on the field will be filtered according to the VTypes -vtype Mask property.

        -
      • -
      • 4. Field specific regex test -
        -

        If none of the prior validation steps halts validation, a field's -configured regex test will be processed. -The invalid message for this test is configured with -regexText.

        -
      • Parameters:
        • value : Mixed
          The value to validate
        Returns:
        • Boolean
          True if the value is valid, else false
      TextField

      Public Events

      EventDefined By

      Public Events

      EventDefined By