X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/7a654f8d43fdb43d78b63d90528bed6e86b608cc..6746dc89c47ed01b165cc1152533605f97eb8e8d:/docs/source/Base.html diff --git a/docs/source/Base.html b/docs/source/Base.html index e56d2312..7ce544d5 100644 --- a/docs/source/Base.html +++ b/docs/source/Base.html @@ -1,5 +1,22 @@ -
+ +/** - * @class Ext.form.field.Base + + + + +\ No newline at end of file +The source code + + + + + + +/** + * @class Ext.form.field.Base * @extends Ext.Component Base class for form fields that provides default event handling, rendering, and other common functionality @@ -78,11 +95,7 @@ __Example usage:__ renderTo: Ext.getBody() }); - * @constructor - * Creates a new Field - * @param {Object} config Configuration options * - * @xtype field * @markdown * @docauthor Jason Johnston <jason@sencha.com> */ @@ -108,14 +121,14 @@ Ext.define('Ext.form.field.Base', { } ], - /** + /** * @cfg {String} name The name of the field (defaults to undefined). This is used as the parameter * name when including the field value in a {@link Ext.form.Basic#submit form submit()}. If no name is * configured, it falls back to the {@link #inputId}. To prevent the field from being included in the * form submit, set {@link #submitValue} to <tt>false</tt>. */ - /** + /** * @cfg {String} inputType * <p>The type attribute for input fields -- e.g. radio, text, password, file (defaults to <tt>'text'</tt>). * The extended types supported by HTML5 inputs (url, email, etc.) may also be used, though using them @@ -126,39 +139,39 @@ Ext.define('Ext.form.field.Base', { */ inputType: 'text', - /** + /** * @cfg {Number} tabIndex The tabIndex for this field. Note this only applies to fields that are rendered, * not those which are built via applyTo (defaults to undefined). */ - /** + /** * @cfg {String} invalidText The error text to use when marking a field invalid and no message is provided * (defaults to 'The value in this field is invalid') */ invalidText : 'The value in this field is invalid', - /** + /** * @cfg {String} fieldCls The default CSS class for the field input (defaults to 'x-form-field') */ fieldCls : Ext.baseCSSPrefix + 'form-field', - /** + /** * @cfg {String} fieldStyle Optional CSS style(s) to be applied to the {@link #inputEl field input element}. * Should be a valid argument to {@link Ext.core.Element#applyStyles}. Defaults to undefined. See also the * {@link #setFieldStyle} method for changing the style after initialization. */ - /** + /** * @cfg {String} focusCls The CSS class to use when the field receives focus (defaults to 'x-form-focus') */ focusCls : Ext.baseCSSPrefix + 'form-focus', - /** + /** * @cfg {String} dirtyCls The CSS class to use when the field value {@link #isDirty is dirty}. */ dirtyCls : Ext.baseCSSPrefix + 'form-dirty', - /** + /** * @cfg {Array} checkChangeEvents * <p>A list of event names that will be listened for on the field's {@link #inputEl input element}, which * will cause the field's value to be checked for changes. If a change is detected, the @@ -182,7 +195,7 @@ Ext.define('Ext.form.field.Base', { ['change', 'propertychange'] : ['change', 'input', 'textInput', 'keyup', 'dragdrop'], - /** + /** * @cfg {Number} checkChangeBuffer * Defines a timeout in milliseconds for buffering {@link #checkChangeEvents} that fire in rapid succession. * Defaults to 50 milliseconds. @@ -191,7 +204,7 @@ Ext.define('Ext.form.field.Base', { componentLayout: 'field', - /** + /** * @cfg {Boolean} readOnly <tt>true</tt> to mark the field as readOnly in HTML * (defaults to <tt>false</tt>). * <br><p><b>Note</b>: this only sets the element's readOnly DOM attribute. @@ -202,18 +215,18 @@ Ext.define('Ext.form.field.Base', { */ readOnly : false, - /** + /** * @cfg {String} readOnlyCls The CSS class applied to the component's main element when it is {@link #readOnly}. */ readOnlyCls: Ext.baseCSSPrefix + 'form-readonly', - /** + /** * @cfg {String} inputId * The id that will be given to the generated input DOM element. Defaults to an automatically generated id. * If you configure this manually, you must make sure it is unique in the document. */ - /** + /** * @cfg {Boolean} validateOnBlur * Whether the field should validate when it loses focus (defaults to <tt>true</tt>). This will cause fields * to be validated as the user steps through the fields in the form regardless of whether they are making @@ -237,19 +250,19 @@ Ext.define('Ext.form.field.Base', { me.subTplData = me.subTplData || {}; me.addEvents( - /** + /** * @event focus * Fires when this field receives input focus. * @param {Ext.form.field.Base} this */ 'focus', - /** + /** * @event blur * Fires when this field loses input focus. * @param {Ext.form.field.Base} this */ 'blur', - /** + /** * @event specialkey * Fires when any key related to navigation (arrows, tab, enter, esc, etc.) is pressed. * To handle other keys see {@link Ext.panel.Panel#keys} or {@link Ext.util.KeyMap}. @@ -295,7 +308,7 @@ var form = new Ext.form.Panel({ } }, - /** + /** * Returns the input id for this field. If none was specified via the {@link #inputId} config, * then an id will be automatically generated. */ @@ -303,7 +316,7 @@ var form = new Ext.form.Panel({ return this.inputId || (this.inputId = Ext.id()); }, - /** + /** * @protected Creates and returns the data object to be used when rendering the {@link #fieldSubTpl}. * @return {Object} The template data */ @@ -324,7 +337,7 @@ var form = new Ext.form.Panel({ }); }, - /** + /** * @protected * Gets the markup to be inserted into the outer template's bodyEl. For fields this is the * actual input element. @@ -345,7 +358,7 @@ var form = new Ext.form.Panel({ return Ext.applyIf(this.callParent(), this.getLabelableRenderData()); }, - /** + /** * Set the {@link #fieldStyle CSS style} of the {@link #inputEl field input element}. * @param {String/Object/Function} style The style(s) to apply. Should be a valid argument to * {@link Ext.core.Element#applyStyles}. @@ -368,7 +381,7 @@ var form = new Ext.form.Panel({ Ext.applyIf(renderSelectors, me.getLabelableSelectors()); Ext.applyIf(renderSelectors, { - /** + /** * @property inputEl * @type Ext.core.Element * The input Element for this Field. Only available after the field has been rendered. @@ -437,7 +450,7 @@ var form = new Ext.form.Panel({ return data; }, - /** + /** * <p>Returns the value that would be included in a standard form submit for this field. This will be combined * with the field's name to form a <tt>name=value</tt> pair in the {@link #getSubmitData submitted parameters}. * If an empty string is returned then just the <tt>name=</tt> will be submitted; if <tt>null</tt> is returned @@ -450,7 +463,7 @@ var form = new Ext.form.Panel({ return this.processRawValue(this.getRawValue()); }, - /** + /** * Returns the raw value of the field, without performing any normalization, conversion, or validation. * To get a normalized and converted value see {@link #getValue}. * @return {String} value The raw String value of the field @@ -462,7 +475,7 @@ var form = new Ext.form.Panel({ return v; }, - /** + /** * Sets the field's raw value directly, bypassing {@link #valueToRaw value conversion}, change detection, and * validation. To set the value with these additional inspections see {@link #setValue}. * @param {Mixed} value The value to set @@ -480,7 +493,7 @@ var form = new Ext.form.Panel({ return value; }, - /** + /** * <p>Converts a mixed-type value to a raw representation suitable for displaying in the field. This allows * controlling how value objects passed to {@link #setValue} are shown to the user, including localization. * For instance, for a {@link Ext.form.field.Date}, this would control how a Date object passed to {@link #setValue} @@ -495,7 +508,7 @@ var form = new Ext.form.Panel({ return '' + Ext.value(value, ''); }, - /** + /** * <p>Converts a raw input field value into a mixed-type value that is suitable for this particular field type. * This allows controlling the normalization and conversion of user-entered values into field-type-appropriate * values, e.g. a Date object for {@link Ext.form.field.Date}, and is invoked by {@link #getValue}.</p> @@ -510,7 +523,7 @@ var form = new Ext.form.Panel({ return rawValue; }, - /** + /** * Performs any necessary manipulation of a raw field value to prepare it for {@link #rawToValue conversion} * and/or {@link #validate validation}, for instance stripping out ignored characters. In the base implementation * it does nothing; individual subclasses may override this as needed. @@ -521,7 +534,7 @@ var form = new Ext.form.Panel({ return value; }, - /** + /** * Returns the current data value of the field. The type of value returned is particular to the type of the * particular field (e.g. a Date object for {@link Ext.form.field.Date}), as the result of calling {@link #rawToValue} on * the field's {@link #processRawValue processed} String value. To return the raw String value, see {@link #getRawValue}. @@ -534,7 +547,7 @@ var form = new Ext.form.Panel({ return val; }, - /** + /** * Sets a data value into the field and runs the change detection and validation. To set the value directly * without these inspections see {@link #setRawValue}. * @param {Mixed} value The value to set @@ -567,7 +580,7 @@ var form = new Ext.form.Panel({ } }, - /** + /** * Sets the read only state of this field. * @param {Boolean} readOnly Whether the field should be read only. */ @@ -679,7 +692,7 @@ var form = new Ext.form.Panel({ postBlur : Ext.emptyFn, - /** + /** * @private Called when the field's dirty state changes. Adds/removes the {@link #dirtyCls} on the main element. * @param {Boolean} isDirty */ @@ -688,7 +701,7 @@ var form = new Ext.form.Panel({ }, - /** + /** * Returns whether or not the field value is currently valid by * {@link #getErrors validating} the {@link #processRawValue processed raw value} * of the field. <b>Note</b>: {@link #disabled} fields are always treated as valid. @@ -700,7 +713,7 @@ var form = new Ext.form.Panel({ }, - /** + /** * <p>Uses {@link #getErrors} to build an array of validation errors. If any errors are found, they are passed * to {@link #markInvalid} and false is returned, otherwise true is returned.</p> * <p>Previously, subclasses were invited to provide an implementation of this to process validations - from 3.2 @@ -723,7 +736,7 @@ var form = new Ext.form.Panel({ return isValid; }, - /** + /** * <p>Display one or more error messages associated with this field, using {@link #msgTarget} to determine how to * display the messages and applying {@link #invalidCls} to the field's UI element.</p> * <p><b>Note</b>: this method does not cause the Field's {@link #validate} or {@link #isValid} methods to @@ -742,7 +755,7 @@ var form = new Ext.form.Panel({ } }, - /** + /** * <p>Clear any invalid styles/messages for this field.</p> * <p><b>Note</b>: this method does not cause the Field's {@link #validate} or {@link #isValid} methods to * return <code>true</code> if the value does not <i>pass</i> validation. So simply clearing a field's errors @@ -759,7 +772,7 @@ var form = new Ext.form.Panel({ } }, - /** + /** * @private Overrides the method from the Ext.form.Labelable mixin to also add the invalidCls to the inputEl, * as that is required for proper styling in IE with nested fields (due to lack of child selector) */ @@ -779,4 +792,6 @@ var form = new Ext.form.Panel({ } }); -