-<!DOCTYPE html><html><head><title>Sencha Documentation Project</title><link rel="stylesheet" href="../reset.css" type="text/css"><link rel="stylesheet" href="../prettify.css" type="text/css"><link rel="stylesheet" href="../prettify_sa.css" type="text/css"><script type="text/javascript" src="../prettify.js"></script></head><body onload="prettyPrint()"><pre class="prettyprint"><pre><span id='Ext-form.field.Text-method-constructor'><span id='Ext-form.field.Text'>/**
+<!DOCTYPE html>
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <title>The source code</title>
+ <link href="../prettify/prettify.css" type="text/css" rel="stylesheet" />
+ <script type="text/javascript" src="../prettify/prettify.js"></script>
+ <style type="text/css">
+ .highlight { display: block; background-color: #ddd; }
+ </style>
+ <script type="text/javascript">
+ function highlight() {
+ document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
+ }
+ </script>
+</head>
+<body onload="prettyPrint(); highlight();">
+ <pre class="prettyprint lang-js"><span id='Ext-form-field-Text-method-constructor'><span id='Ext-form-field-Text'>/**
</span></span> * @class Ext.form.field.Text
* @extends Ext.form.field.Base
requires: ['Ext.form.field.VTypes', 'Ext.layout.component.field.Text'],
alternateClassName: ['Ext.form.TextField', 'Ext.form.Text'],
-<span id='Ext-form.field.Text-cfg-vtypeText'> /**
+<span id='Ext-form-field-Text-cfg-vtypeText'> /**
</span> * @cfg {String} vtypeText A custom error message to display in place of the default message provided
* for the <b><code>{@link #vtype}</code></b> currently set for this field (defaults to <tt>undefined</tt>).
* <b>Note</b>: only applies if <b><code>{@link #vtype}</code></b> is set, else ignored.
*/
-<span id='Ext-form.field.Text-cfg-stripCharsRe'> /**
+<span id='Ext-form-field-Text-cfg-stripCharsRe'> /**
</span> * @cfg {RegExp} stripCharsRe A JavaScript RegExp object used to strip unwanted content from the value
* before validation (defaults to <tt>undefined</tt>).
*/
-<span id='Ext-form.field.Text-cfg-size'> /**
+<span id='Ext-form-field-Text-cfg-size'> /**
</span> * @cfg {Number} size An initial value for the 'size' attribute on the text input element. This is only
* used if the field has no configured {@link #width} and is not given a width by its container's layout.
* Defaults to <tt>20</tt>.
*/
size: 20,
-<span id='Ext-form.field.Text-cfg-grow'> /**
+<span id='Ext-form-field-Text-cfg-grow'> /**
</span> * @cfg {Boolean} grow <tt>true</tt> if this field should automatically grow and shrink to its content
* (defaults to <tt>false</tt>)
*/
-<span id='Ext-form.field.Text-cfg-growMin'> /**
+<span id='Ext-form-field-Text-cfg-growMin'> /**
</span> * @cfg {Number} growMin The minimum width to allow when <code><b>{@link #grow}</b> = true</code> (defaults
* to <tt>30</tt>)
*/
growMin : 30,
-<span id='Ext-form.field.Text-cfg-growMax'> /**
+<span id='Ext-form-field-Text-cfg-growMax'> /**
</span> * @cfg {Number} growMax The maximum width to allow when <code><b>{@link #grow}</b> = true</code> (defaults
* to <tt>800</tt>)
*/
growMax : 800,
-<span id='Ext-form.field.Text-cfg-growAppend'> /**
+<span id='Ext-form-field-Text-cfg-growAppend'> /**
</span> * @cfg {String} growAppend
* A string that will be appended to the field's current value for the purposes of calculating the target
* field size. Only used when the {@link #grow} config is <tt>true</tt>. Defaults to a single capital "W"
*/
growAppend: 'W',
-<span id='Ext-form.field.Text-cfg-vtype'> /**
+<span id='Ext-form-field-Text-cfg-vtype'> /**
</span> * @cfg {String} vtype A validation type name as defined in {@link Ext.form.field.VTypes} (defaults to <tt>undefined</tt>)
*/
-<span id='Ext-form.field.Text-cfg-maskRe'> /**
+<span id='Ext-form-field-Text-cfg-maskRe'> /**
</span> * @cfg {RegExp} maskRe An input mask regular expression that will be used to filter keystrokes that do
* not match (defaults to <tt>undefined</tt>)
*/
-<span id='Ext-form.field.Text-cfg-disableKeyFilter'> /**
+<span id='Ext-form-field-Text-cfg-disableKeyFilter'> /**
</span> * @cfg {Boolean} disableKeyFilter Specify <tt>true</tt> to disable input keystroke filtering (defaults
* to <tt>false</tt>)
*/
-<span id='Ext-form.field.Text-cfg-allowBlank'> /**
+<span id='Ext-form-field-Text-cfg-allowBlank'> /**
</span> * @cfg {Boolean} allowBlank Specify <tt>false</tt> to validate that the value's length is > 0 (defaults to
* <tt>true</tt>)
*/
allowBlank : true,
-<span id='Ext-form.field.Text-cfg-minLength'> /**
+<span id='Ext-form-field-Text-cfg-minLength'> /**
</span> * @cfg {Number} minLength Minimum input field length required (defaults to <tt>0</tt>)
*/
minLength : 0,
-<span id='Ext-form.field.Text-cfg-maxLength'> /**
+<span id='Ext-form-field-Text-cfg-maxLength'> /**
</span> * @cfg {Number} maxLength Maximum input field length allowed by validation (defaults to Number.MAX_VALUE).
* This behavior is intended to provide instant feedback to the user by improving usability to allow pasting
* and editing or overtyping and back tracking. To restrict the maximum number of characters that can be
*/
maxLength : Number.MAX_VALUE,
-<span id='Ext-form.field.Text-cfg-enforceMaxLength'> /**
+<span id='Ext-form-field-Text-cfg-enforceMaxLength'> /**
</span> * @cfg {Boolean} enforceMaxLength True to set the maxLength property on the underlying input field. Defaults to <tt>false</tt>
*/
-<span id='Ext-form.field.Text-cfg-minLengthText'> /**
+<span id='Ext-form-field-Text-cfg-minLengthText'> /**
</span> * @cfg {String} minLengthText Error text to display if the <b><tt>{@link #minLength minimum length}</tt></b>
* validation fails (defaults to <tt>'The minimum length for this field is {minLength}'</tt>)
*/
minLengthText : 'The minimum length for this field is {0}',
-<span id='Ext-form.field.Text-cfg-maxLengthText'> /**
+<span id='Ext-form-field-Text-cfg-maxLengthText'> /**
</span> * @cfg {String} maxLengthText Error text to display if the <b><tt>{@link #maxLength maximum length}</tt></b>
* validation fails (defaults to <tt>'The maximum length for this field is {maxLength}'</tt>)
*/
maxLengthText : 'The maximum length for this field is {0}',
-<span id='Ext-form.field.Text-cfg-selectOnFocus'> /**
+<span id='Ext-form-field-Text-cfg-selectOnFocus'> /**
</span> * @cfg {Boolean} selectOnFocus <tt>true</tt> to automatically select any existing field text when the field
* receives input focus (defaults to <tt>false</tt>)
*/
-<span id='Ext-form.field.Text-cfg-blankText'> /**
+<span id='Ext-form-field-Text-cfg-blankText'> /**
</span> * @cfg {String} blankText The error text to display if the <b><tt>{@link #allowBlank}</tt></b> validation
* fails (defaults to <tt>'This field is required'</tt>)
*/
blankText : 'This field is required',
-<span id='Ext-form.field.Text-cfg-validator'> /**
+<span id='Ext-form-field-Text-cfg-validator'> /**
</span> * @cfg {Function} validator
* <p>A custom validation function to be called during field validation ({@link #getErrors})
* (defaults to <tt>undefined</tt>). If specified, this function will be called first, allowing the
* </ul></div>
*/
-<span id='Ext-form.field.Text-cfg-regex'> /**
+<span id='Ext-form-field-Text-cfg-regex'> /**
</span> * @cfg {RegExp} regex A JavaScript RegExp object to be tested against the field value during validation
* (defaults to <tt>undefined</tt>). If the test fails, the field will be marked invalid using
* <b><tt>{@link #regexText}</tt></b>.
*/
-<span id='Ext-form.field.Text-cfg-regexText'> /**
+<span id='Ext-form-field-Text-cfg-regexText'> /**
</span> * @cfg {String} regexText The error text to display if <b><tt>{@link #regex}</tt></b> is used and the
* test fails during validation (defaults to <tt>''</tt>)
*/
regexText : '',
-<span id='Ext-form.field.Text-cfg-emptyText'> /**
+<span id='Ext-form-field-Text-cfg-emptyText'> /**
</span> * @cfg {String} emptyText
* <p>The default text to place into an empty field (defaults to <tt>undefined</tt>).</p>
* <p>Note that normally this value will be submitted to the server if this field is enabled; to prevent this
* supported and should be avoided.</p>
*/
-<span id='Ext-form.field.Text-cfg-emptyCls'> /**
+<span id='Ext-form-field-Text-cfg-emptyCls'> /**
</span> * @cfg {String} emptyCls The CSS class to apply to an empty field to style the <b><tt>{@link #emptyText}</tt></b>
* (defaults to <tt>'x-form-empty-field'</tt>). This class is automatically added and removed as needed
* depending on the current field value.
ariaRole: 'textbox',
-<span id='Ext-form.field.Text-cfg-enableKeyEvents'> /**
+<span id='Ext-form-field-Text-cfg-enableKeyEvents'> /**
</span> * @cfg {Boolean} enableKeyEvents <tt>true</tt> to enable the proxying of key events for the HTML input field (defaults to <tt>false</tt>)
*/
initComponent : function(){
this.callParent();
this.addEvents(
-<span id='Ext-form.field.Text-event-autosize'> /**
+<span id='Ext-form-field-Text-event-autosize'> /**
</span> * @event autosize
* Fires when the <tt><b>{@link #autoSize}</b></tt> function is triggered and the field is
* resized according to the {@link #grow}/{@link #growMin}/{@link #growMax} configs as a result.
*/
'autosize',
-<span id='Ext-form.field.Text-event-keydown'> /**
+<span id='Ext-form-field-Text-event-keydown'> /**
</span> * @event keydown
* Keydown input field event. This event only fires if <tt><b>{@link #enableKeyEvents}</b></tt>
* is set to true.
* @param {Ext.EventObject} e
*/
'keydown',
-<span id='Ext-form.field.Text-event-keyup'> /**
+<span id='Ext-form-field-Text-event-keyup'> /**
</span> * @event keyup
* Keyup input field event. This event only fires if <tt><b>{@link #enableKeyEvents}</b></tt>
* is set to true.
* @param {Ext.EventObject} e
*/
'keyup',
-<span id='Ext-form.field.Text-event-keypress'> /**
+<span id='Ext-form-field-Text-event-keypress'> /**
</span> * @event keypress
* Keypress input field event. This event only fires if <tt><b>{@link #enableKeyEvents}</b></tt>
* is set to true.
}
},
-<span id='Ext-form.field.Text-method-isEqual'> /**
+<span id='Ext-form-field-Text-method-isEqual'> /**
</span> * @private override - treat undefined and null values as equal to an empty string value
*/
isEqual: function(value1, value2) {
return String(Ext.value(value1, '')) === String(Ext.value(value2, ''));
},
-<span id='Ext-form.field.Text-method-onChange'> /**
+<span id='Ext-form-field-Text-method-onChange'> /**
</span> * @private
* If grow=true, invoke the autoSize method when the field's value is changed.
*/
}
},
-<span id='Ext-form.field.Text-method-processRawValue'> /**
+<span id='Ext-form-field-Text-method-processRawValue'> /**
</span> * Performs any necessary manipulation of a raw String value to prepare it for {@link #stringToValue conversion}
* and/or {@link #validate validation}. For text fields this applies the configured {@link #stripCharsRe} to the
* raw value.
this.fireEvent('keypress', this, e);
},
-<span id='Ext-form.field.Text-method-reset'> /**
+<span id='Ext-form-field-Text-method-reset'> /**
</span> * Resets the current field value to the originally-loaded value and clears any validation messages.
* Also adds <tt><b>{@link #emptyText}</b></tt> and <tt><b>{@link #emptyCls}</b></tt> if the
* original value was blank.
}
},
-<span id='Ext-form.field.Text-method-getRawValue'> /**
+<span id='Ext-form-field-Text-method-getRawValue'> /**
</span> * Returns the raw String value of the field, without performing any normalization, conversion, or validation.
* Gets the current value of the input element if the field has been rendered, ignoring the value if it is the
* {@link #emptyText}. To get a normalized and converted value see {@link #getValue}.
return v;
},
-<span id='Ext-form.field.Text-method-setValue'> /**
+<span id='Ext-form-field-Text-method-setValue'> /**
</span> * Sets a data value into the field and runs the change detection and validation. Also applies any configured
* {@link #emptyText} for text fields. To set the value directly without these inspections see {@link #setRawValue}.
* @param {Mixed} value The value to set
return me;
},
-<span id='Ext-form.field.Text-method-getErrors'> /**
+<span id='Ext-form-field-Text-method-getErrors'> /**
</span>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:
return errors;
},
-<span id='Ext-form.field.Text-method-selectText'> /**
+<span id='Ext-form-field-Text-method-selectText'> /**
</span> * Selects text in this field
* @param {Number} start (optional) The index where the selection should start (defaults to 0)
* @param {Number} end (optional) The index where the selection should end (defaults to the text length)
}
},
-<span id='Ext-form.field.Text-method-autoSize'> /**
+<span id='Ext-form-field-Text-method-autoSize'> /**
</span> * Automatically grows the field to accomodate the width of the text up to the maximum field width allowed.
* This only takes effect if <tt>{@link #grow} = true</tt>, and fires the {@link #autosize} event if the
* width changes.
this.getActionEl().dom.setAttribute('aria-required', this.allowBlank === false);
},
-<span id='Ext-form.field.Text-method-getBodyNaturalWidth'> /**
+<span id='Ext-form-field-Text-method-getBodyNaturalWidth'> /**
</span> * @protected override
* To get the natural width of the inputEl, we do a simple calculation based on the
* 'size' config. We use hard-coded numbers to approximate what browsers do natively,
}
});
-</pre></pre></body></html>
\ No newline at end of file
+</pre>
+</body>
+</html>