X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/7a654f8d43fdb43d78b63d90528bed6e86b608cc..6746dc89c47ed01b165cc1152533605f97eb8e8d:/docs/source/Text.html?ds=sidebyside diff --git a/docs/source/Text.html b/docs/source/Text.html index 2e347577..f46f5ec9 100644 --- a/docs/source/Text.html +++ b/docs/source/Text.html @@ -1,5 +1,22 @@ -Sencha Documentation Project
/**
- * @class Ext.form.field.Text
+
+
+
+  
+  The source code
+  
+  
+  
+  
+
+
+  
/**
+ * @class Ext.form.field.Text
  * @extends Ext.form.field.Base
  
 A basic text field.  Can be used as a direct replacement for traditional text inputs,
@@ -14,7 +31,7 @@ The Text field has a useful set of validations built in:
 - {@link #minLength} for requiring a minimum value length
 - {@link #maxLength} for setting a maximum value length (with {@link #enforceMaxLength} to add it
   as the `maxlength` attribute on the input element)
-- {@link regex} to specify a custom regular expression for validation
+- {@link #regex} to specify a custom regular expression for validation
 
 In addition, custom validations may be added:
  
@@ -55,10 +72,7 @@ validation: see {@link #maskRe} and {@link #stripCharsRe} for details.
         }]
     }); 
 
- * @constructor Creates a new TextField
- * @param {Object} config Configuration options
  *
- * @xtype textfield
  * @markdown
  * @docauthor Jason Johnston <jason@sencha.com>
  */
@@ -68,42 +82,42 @@ Ext.define('Ext.form.field.Text', {
     requires: ['Ext.form.field.VTypes', 'Ext.layout.component.field.Text'],
     alternateClassName: ['Ext.form.TextField', 'Ext.form.Text'],
 
-    /**
+    /**
      * @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.
      */
     
-    /**
+    /**
      * @cfg {RegExp} stripCharsRe A JavaScript RegExp object used to strip unwanted content from the value
      * before validation (defaults to <tt>undefined</tt>).
      */
 
-    /**
+    /**
      * @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,
 
-    /**
+    /**
      * @cfg {Boolean} grow <tt>true</tt> if this field should automatically grow and shrink to its content
      * (defaults to <tt>false</tt>)
      */
 
-    /**
+    /**
      * @cfg {Number} growMin The minimum width to allow when <code><b>{@link #grow}</b> = true</code> (defaults
      * to <tt>30</tt>)
      */
     growMin : 30,
     
-    /**
+    /**
      * @cfg {Number} growMax The maximum width to allow when <code><b>{@link #grow}</b> = true</code> (defaults
      * to <tt>800</tt>)
      */
     growMax : 800,
 
-    /**
+    /**
      * @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"
@@ -112,32 +126,32 @@ Ext.define('Ext.form.field.Text', {
      */
     growAppend: 'W',
     
-    /**
+    /**
      * @cfg {String} vtype A validation type name as defined in {@link Ext.form.field.VTypes} (defaults to <tt>undefined</tt>)
      */
 
-    /**
+    /**
      * @cfg {RegExp} maskRe An input mask regular expression that will be used to filter keystrokes that do
      * not match (defaults to <tt>undefined</tt>)
      */
 
-    /**
+    /**
      * @cfg {Boolean} disableKeyFilter Specify <tt>true</tt> to disable input keystroke filtering (defaults
      * to <tt>false</tt>)
      */
 
-    /**
+    /**
      * @cfg {Boolean} allowBlank Specify <tt>false</tt> to validate that the value's length is > 0 (defaults to
      * <tt>true</tt>)
      */
     allowBlank : true,
     
-    /**
+    /**
      * @cfg {Number} minLength Minimum input field length required (defaults to <tt>0</tt>)
      */
     minLength : 0,
     
-    /**
+    /**
      * @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
@@ -145,34 +159,34 @@ Ext.define('Ext.form.field.Text', {
      */
     maxLength : Number.MAX_VALUE,
     
-    /**
+    /**
      * @cfg {Boolean} enforceMaxLength True to set the maxLength property on the underlying input field. Defaults to <tt>false</tt>
      */
 
-    /**
+    /**
      * @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}',
     
-    /**
+    /**
      * @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}',
     
-    /**
+    /**
      * @cfg {Boolean} selectOnFocus <tt>true</tt> to automatically select any existing field text when the field
      * receives input focus (defaults to <tt>false</tt>)
      */
     
-    /**
+    /**
      * @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',
     
-    /**
+    /**
      * @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
@@ -191,19 +205,19 @@ Ext.define('Ext.form.field.Text', {
      * </ul></div>
      */
 
-    /**
+    /**
      * @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>.
      */
 
-    /**
+    /**
      * @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 : '',
     
-    /**
+    /**
      * @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
@@ -213,7 +227,7 @@ Ext.define('Ext.form.field.Text', {
      * supported and should be avoided.</p>
      */
 
-    /**
+    /**
      * @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.
@@ -222,7 +236,7 @@ Ext.define('Ext.form.field.Text', {
 
     ariaRole: 'textbox',
 
-    /**
+    /**
      * @cfg {Boolean} enableKeyEvents <tt>true</tt> to enable the proxying of key events for the HTML input field (defaults to <tt>false</tt>)
      */
 
@@ -231,7 +245,7 @@ Ext.define('Ext.form.field.Text', {
     initComponent : function(){
         this.callParent();
         this.addEvents(
-            /**
+            /**
              * @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.
@@ -242,7 +256,7 @@ Ext.define('Ext.form.field.Text', {
              */
             'autosize',
 
-            /**
+            /**
              * @event keydown
              * Keydown input field event. This event only fires if <tt><b>{@link #enableKeyEvents}</b></tt>
              * is set to true.
@@ -250,7 +264,7 @@ Ext.define('Ext.form.field.Text', {
              * @param {Ext.EventObject} e
              */
             'keydown',
-            /**
+            /**
              * @event keyup
              * Keyup input field event. This event only fires if <tt><b>{@link #enableKeyEvents}</b></tt>
              * is set to true.
@@ -258,7 +272,7 @@ Ext.define('Ext.form.field.Text', {
              * @param {Ext.EventObject} e
              */
             'keyup',
-            /**
+            /**
              * @event keypress
              * Keypress input field event. This event only fires if <tt><b>{@link #enableKeyEvents}</b></tt>
              * is set to true.
@@ -292,14 +306,14 @@ Ext.define('Ext.form.field.Text', {
         }
     },
 
-    /**
+    /**
      * @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, ''));
     },
 
-    /**
+    /**
      * @private
      * If grow=true, invoke the autoSize method when the field's value is changed.
      */
@@ -325,7 +339,7 @@ Ext.define('Ext.form.field.Text', {
         }
     },
 
-    /**
+    /**
      * 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.
@@ -375,7 +389,7 @@ Ext.define('Ext.form.field.Text', {
         this.fireEvent('keypress', this, e);
     },
 
-    /**
+    /**
      * 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.
@@ -461,7 +475,7 @@ Ext.define('Ext.form.field.Text', {
         }
     },
 
-    /**
+    /**
      * 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}.
@@ -476,7 +490,7 @@ Ext.define('Ext.form.field.Text', {
         return v;
     },
 
-    /**
+    /**
      * 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
@@ -496,7 +510,7 @@ Ext.define('Ext.form.field.Text', {
         return me;
     },
 
-    /**
+    /**
 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:
 
@@ -601,7 +615,7 @@ for any failing validations. Validation rules are processed in the following ord
         return errors;
     },
 
-    /**
+    /**
      * 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)
@@ -633,7 +647,7 @@ for any failing validations. Validation rules are processed in the following ord
         }
     },
 
-    /**
+    /**
      * 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.
@@ -656,7 +670,7 @@ for any failing validations. Validation rules are processed in the following ord
         this.getActionEl().dom.setAttribute('aria-required', this.allowBlank === false);
     },
 
-    /**
+    /**
      * @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,
@@ -667,4 +681,6 @@ for any failing validations. Validation rules are processed in the following ord
     }
 
 });
-
\ No newline at end of file +
+ +