X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/3789b528d8dd8aad4558e38e22d775bcab1cbd36..HEAD:/docs/output/Ext.form.Labelable.js diff --git a/docs/output/Ext.form.Labelable.js b/docs/output/Ext.form.Labelable.js index 231d8ccf..0fb5aa40 100644 --- a/docs/output/Ext.form.Labelable.js +++ b/docs/output/Ext.form.Labelable.js @@ -1,606 +1 @@ -Ext.data.JsonP.Ext_form_Labelable({ - "tagname": "class", - "name": "Ext.form.Labelable", - "doc": "
A mixin which allows a component to be configured and decorated with a label and/or error message as is\ncommon for form fields. This is used by e.g. Ext.form.field.Base and Ext.form.FieldContainer\nto let them be managed by the Field layout.
\n\n*NOTE**: This mixin is mainly for internal library use and most users should not need to use it directly. It\nis more likely you will want to use one of the component classes that import this mixin, such as\nExt.form.field.Base or Ext.form.FieldContainer.
\n\nUse of this mixin does not make a component a field in the logical sense, meaning it does not provide any\nlogic or state related to values or validation; that is handled by the related Ext.form.field.Field\nmixin. These two mixins may be used separately (for example Ext.form.FieldContainer is Labelable but not a\nField), or in combination (for example Ext.form.field.Base implements both and has logic for connecting the\ntwo.)
\n\nComponent classes which use this mixin should use the Field layout\nor a derivation thereof to properly size and position the label and message according to the component config.\nThey must also call the initLabelable method during component initialization to ensure the mixin gets\nset up correctly.
\n", - "extends": null, - "mixins": [ - - ], - "alternateClassNames": [ - - ], - "xtype": null, - "author": null, - "docauthor": "Jason JohnstonIf specified, then the component will be displayed with this value as its active error when\nfirst rendered. Defaults to undefined. Use setActiveError or unsetActiveError to\nchange it after component creation.
\n", - "private": false, - "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/Labelable.js", - "linenr": 206, - "html_filename": "Labelable.html", - "href": "Labelable.html#Ext-form-Labelable-cfg-activeError", - "shortDoc": "If specified, then the component will be displayed with this value as its active error when\nfirst rendered. Defaults ..." - }, - { - "tagname": "cfg", - "name": "activeErrorsTpl", - "member": "Ext.form.Labelable", - "type": "Ext.XTemplate", - "doc": "The template used to format the Array of error messages passed to setActiveErrors\ninto a single HTML string. By default this renders each message as an item in an unordered list.
\n", - "private": false, - "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/Labelable.js", - "linenr": 50, - "html_filename": "Labelable.html", - "href": "Labelable.html#Ext-form-Labelable-cfg-activeErrorsTpl", - "shortDoc": "The template used to format the Array of error messages passed to setActiveErrors\ninto a single HTML string. By defau..." - }, - { - "tagname": "cfg", - "name": "autoFitErrors", - "member": "Ext.form.Labelable", - "type": "Boolean", - "doc": "Whether to adjust the component's body area to make room for 'side' or 'under'\nerror messages. Defaults to true.
\n", - "private": false, - "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/Labelable.js", - "linenr": 184, - "html_filename": "Labelable.html", - "href": "Labelable.html#Ext-form-Labelable-cfg-autoFitErrors" - }, - { - "tagname": "cfg", - "name": "baseBodyCls", - "member": "Ext.form.Labelable", - "type": "String", - "doc": "The CSS class to be applied to the body content element. Defaults to 'x-form-item-body'.
\n", - "private": false, - "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/Labelable.js", - "linenr": 87, - "html_filename": "Labelable.html", - "href": "Labelable.html#Ext-form-Labelable-cfg-baseBodyCls" - }, - { - "tagname": "cfg", - "name": "clearCls", - "member": "Ext.form.Labelable", - "type": "String", - "doc": "The CSS class to be applied to the special clearing div rendered directly after the field\ncontents wrapper to provide field clearing (defaults to 'x-clear').
\n", - "private": false, - "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/Labelable.js", - "linenr": 100, - "html_filename": "Labelable.html", - "href": "Labelable.html#Ext-form-Labelable-cfg-clearCls", - "shortDoc": "The CSS class to be applied to the special clearing div rendered directly after the field\ncontents wrapper to provide..." - }, - { - "tagname": "cfg", - "name": "errorMsgCls", - "member": "Ext.form.Labelable", - "type": "String", - "doc": "The CSS class to be applied to the error message element. Defaults to 'x-form-error-msg'.
\n", - "private": false, - "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/Labelable.js", - "linenr": 81, - "html_filename": "Labelable.html", - "href": "Labelable.html#Ext-form-Labelable-cfg-errorMsgCls" - }, - { - "tagname": "cfg", - "name": "fieldBodyCls", - "member": "Ext.form.Labelable", - "type": "String", - "doc": "An extra CSS class to be applied to the body content element in addition to fieldBodyCls.\nDefaults to empty.
\n", - "private": false, - "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/Labelable.js", - "linenr": 93, - "html_filename": "Labelable.html", - "href": "Labelable.html#Ext-form-Labelable-cfg-fieldBodyCls" - }, - { - "tagname": "cfg", - "name": "fieldLabel", - "member": "Ext.form.Labelable", - "type": "String", - "doc": "The label for the field. It gets appended with the labelSeparator, and its position\nand sizing is determined by the labelAlign, labelWidth, and labelPad\nconfigs. Defaults to undefined.
\n", - "private": false, - "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/Labelable.js", - "linenr": 113, - "html_filename": "Labelable.html", - "href": "Labelable.html#Ext-form-Labelable-cfg-fieldLabel", - "shortDoc": "The label for the field. It gets appended with the labelSeparator, and its position\nand sizing is determined by the l..." - }, - { - "tagname": "cfg", - "name": "formItemCls", - "member": "Ext.form.Labelable", - "type": "String", - "doc": "A CSS class to be applied to the outermost element to denote that it is participating in the form\nfield layout. Defaults to 'x-form-item'.
\n", - "private": false, - "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/Labelable.js", - "linenr": 68, - "html_filename": "Labelable.html", - "href": "Labelable.html#Ext-form-Labelable-cfg-formItemCls", - "shortDoc": "A CSS class to be applied to the outermost element to denote that it is participating in the form\nfield layout. Defau..." - }, - { - "tagname": "cfg", - "name": "hideEmptyLabel", - "member": "Ext.form.Labelable", - "type": "Boolean", - "doc": "When set to true, the label element (fieldLabel and labelSeparator) will be\nautomatically hidden if the fieldLabel is empty. Setting this to false will cause the empty\nlabel element to be rendered and space to be reserved for it; this is useful if you want a field without a label\nto line up with other labeled fields in the same form. Defaults to true.
\n\n\nIf you wish to unconditionall hide the label even if a non-empty fieldLabel is configured, then set\nthe hideLabel config to true.
\n\n", - "private": false, - "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/Labelable.js", - "linenr": 166, - "html_filename": "Labelable.html", - "href": "Labelable.html#Ext-form-Labelable-cfg-hideEmptyLabel", - "shortDoc": "When set to true, the label element (fieldLabel and labelSeparator) will be\nautomatically hidden if the fieldLabel is..." - }, - { - "tagname": "cfg", - "name": "hideLabel", - "member": "Ext.form.Labelable", - "type": "Boolean", - "doc": "Set to true to completely hide the label element (fieldLabel and labelSeparator).\nDefaults to false.
\n\n\nAlso see hideEmptyLabel, which controls whether space will be reserved for an empty fieldLabel.
\n\n", - "private": false, - "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/Labelable.js", - "linenr": 158, - "html_filename": "Labelable.html", - "href": "Labelable.html#Ext-form-Labelable-cfg-hideLabel", - "shortDoc": "Set to true to completely hide the label element (fieldLabel and labelSeparator).\nDefaults to false.\n\n\nAlso see hideE..." - }, - { - "tagname": "cfg", - "name": "invalidCls", - "member": "Ext.form.Labelable", - "type": "String", - "doc": "The CSS class to use when marking the component invalid (defaults to 'x-form-invalid')
\n", - "private": false, - "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/Labelable.js", - "linenr": 107, - "html_filename": "Labelable.html", - "href": "Labelable.html#Ext-form-Labelable-cfg-invalidCls" - }, - { - "tagname": "cfg", - "name": "labelAlign", - "member": "Ext.form.Labelable", - "type": "String", - "doc": "Controls the position and alignment of the fieldLabel. Valid values are:
\n\n\nThe CSS class to be applied to the label element. Defaults to 'x-form-item-label'.
\n", - "private": false, - "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/Labelable.js", - "linenr": 75, - "html_filename": "Labelable.html", - "href": "Labelable.html#Ext-form-Labelable-cfg-labelCls" - }, - { - "tagname": "cfg", - "name": "labelPad", - "member": "Ext.form.Labelable", - "type": "Number", - "doc": "The amount of space in pixels between the fieldLabel and the input field. Defaults to 5.
\n", - "private": false, - "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/Labelable.js", - "linenr": 141, - "html_filename": "Labelable.html", - "href": "Labelable.html#Ext-form-Labelable-cfg-labelPad" - }, - { - "tagname": "cfg", - "name": "labelSeparator", - "member": "Ext.form.Labelable", - "type": "String", - "doc": "Character(s) to be inserted at the end of the label text.
\n", - "private": false, - "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/Labelable.js", - "linenr": 147, - "html_filename": "Labelable.html", - "href": "Labelable.html#Ext-form-Labelable-cfg-labelSeparator" - }, - { - "tagname": "cfg", - "name": "labelStyle", - "member": "Ext.form.Labelable", - "type": "String", - "doc": "A CSS style specification string to apply directly to this field's label. Defaults to undefined.
\n\n", - "private": false, - "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/Labelable.js", - "linenr": 153, - "html_filename": "Labelable.html", - "href": "Labelable.html#Ext-form-Labelable-cfg-labelStyle" - }, - { - "tagname": "cfg", - "name": "labelWidth", - "member": "Ext.form.Labelable", - "type": "Number", - "doc": "The width of the fieldLabel in pixels. Only applicable if the labelAlign is set\nto \"left\" or \"right\". Defaults to 100.
\n", - "private": false, - "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/Labelable.js", - "linenr": 134, - "html_filename": "Labelable.html", - "href": "Labelable.html#Ext-form-Labelable-cfg-labelWidth" - }, - { - "tagname": "cfg", - "name": "labelableRenderTpl", - "member": "Ext.form.Labelable", - "type": "Array/String/Ext.XTemplate", - "doc": "The rendering template for the field decorations. Component classes using this mixin should include\nlogic to use this as their renderTpl, and implement the\ngetSubTplMarkup method to generate the field body content.
\n", - "private": false, - "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/Labelable.js", - "linenr": 29, - "html_filename": "Labelable.html", - "href": "Labelable.html#Ext-form-Labelable-cfg-labelableRenderTpl", - "shortDoc": "The rendering template for the field decorations. Component classes using this mixin should include\nlogic to use this..." - }, - { - "tagname": "cfg", - "name": "msgTarget", - "member": "Ext.form.Labelable", - "type": "String", - "doc": "The location where the error message text should display.\nMust be one of the following values:
\n\n\nqtip
Display a quick tip containing the message when the user hovers over the field. This is the default.\ntitle
Display the message in a default browser title attribute popup.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.none
Don't display any error message. This might be useful if you are implementing custom error display.[element id]
Add the error message directly to the innerHTML of the specified element.true to disable displaying any error message set on this object.\nDefaults to false.
\n", - "private": false, - "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/Labelable.js", - "linenr": 177, - "html_filename": "Labelable.html", - "href": "Labelable.html#Ext-form-Labelable-cfg-preventMark" - } - ], - "method": [ - { - "tagname": "method", - "name": "getActiveError", - "member": "Ext.form.Labelable", - "doc": "Gets the active error message for this component, if any. This does not trigger\nvalidation on its own, it merely returns any message that the component may already hold.
\n", - "params": [ - - ], - "return": { - "type": "String", - "doc": "The active error message on the component; if there is no error, an empty string is returned.
\n" - }, - "private": false, - "static": false, - "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/Labelable.js", - "linenr": 330, - "html_filename": "Labelable.html", - "href": "Labelable.html#Ext-form-Labelable-method-getActiveError", - "shortDoc": "Gets the active error message for this component, if any. This does not trigger\nvalidation on its own, it merely retu..." - }, - { - "tagname": "method", - "name": "getActiveErrors", - "member": "Ext.form.Labelable", - "doc": "Gets an Array of any active error messages currently applied to the field. This does not trigger\nvalidation on its own, it merely returns any messages that the component may already hold.
\n", - "params": [ - - ], - "return": { - "type": "Array", - "doc": "The active error messages on the component; if there are no errors, an empty Array is returned.
\n" - }, - "private": false, - "static": false, - "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/Labelable.js", - "linenr": 360, - "html_filename": "Labelable.html", - "href": "Labelable.html#Ext-form-Labelable-method-getActiveErrors", - "shortDoc": "Gets an Array of any active error messages currently applied to the field. This does not trigger\nvalidation on its ow..." - }, - { - "tagname": "method", - "name": "getFieldLabel", - "member": "Ext.form.Labelable", - "doc": "Returns the label for the field. Defaults to simply returning the fieldLabel config. Can be\noverridden to provide
\n", - "params": [ - - ], - "return": { - "type": "String", - "doc": "The configured field label, or empty string if not defined
\n" - }, - "private": false, - "static": false, - "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/Labelable.js", - "linenr": 232, - "html_filename": "Labelable.html", - "href": "Labelable.html#Ext-form-Labelable-method-getFieldLabel", - "shortDoc": "Returns the label for the field. Defaults to simply returning the fieldLabel config. Can be\noverridden to provide
\n" - }, - { - "tagname": "method", - "name": "getInputId", - "member": "Ext.form.Labelable", - "doc": "Get the input id, if any, for this component. This is used as the \"for\" attribute on the label element.\nImplementing subclasses may also use this as e.g. the id for their own input element.
\n", - "params": [ - - ], - "return": { - "type": "String", - "doc": "The input id
\n" - }, - "private": false, - "static": false, - "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/Labelable.js", - "linenr": 321, - "html_filename": "Labelable.html", - "href": "Labelable.html#Ext-form-Labelable-method-getInputId", - "shortDoc": "Get the input id, if any, for this component. This is used as the \"for\" attribute on the label element.\nImplementing ..." - }, - { - "tagname": "method", - "name": "hasActiveError", - "member": "Ext.form.Labelable", - "doc": "Tells whether the field currently has an active error message. This does not trigger\nvalidation on its own, it merely looks for any message that the component may already hold.
\n", - "params": [ - - ], - "return": { - "type": "Boolean", - "doc": "\n" - }, - "private": false, - "static": false, - "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/Labelable.js", - "linenr": 339, - "html_filename": "Labelable.html", - "href": "Labelable.html#Ext-form-Labelable-method-hasActiveError", - "shortDoc": "Tells whether the field currently has an active error message. This does not trigger\nvalidation on its own, it merely..." - }, - { - "tagname": "method", - "name": "initLabelable", - "member": "Ext.form.Labelable", - "doc": "Performs initialization of this mixin. Component classes using this mixin should call this method\nduring their own initialization.
\n", - "params": [ - - ], - "return": { - "type": "void", - "doc": "\n" - }, - "private": false, - "static": false, - "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/Labelable.js", - "linenr": 214, - "html_filename": "Labelable.html", - "href": "Labelable.html#Ext-form-Labelable-method-initLabelable", - "shortDoc": "Performs initialization of this mixin. Component classes using this mixin should call this method\nduring their own in..." - }, - { - "tagname": "method", - "name": "setActiveError", - "member": "Ext.form.Labelable", - "doc": "Sets the active error message to the given string. This replaces the entire error message\ncontents with the given string. Also see setActiveErrors which accepts an Array of\nmessages and formats them according to the activeErrorsTpl.
\n", - "params": [ - { - "type": "String", - "name": "msg", - "doc": "The error message
\n", - "optional": false - } - ], - "return": { - "type": "void", - "doc": "\n" - }, - "private": false, - "static": false, - "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/Labelable.js", - "linenr": 348, - "html_filename": "Labelable.html", - "href": "Labelable.html#Ext-form-Labelable-method-setActiveError", - "shortDoc": "Sets the active error message to the given string. This replaces the entire error message\ncontents with the given str..." - }, - { - "tagname": "method", - "name": "setActiveErrors", - "member": "Ext.form.Labelable", - "doc": "Set the active error message to an Array of error messages. The messages are formatted into\na single message string using the activeErrorsTpl. Also see setActiveError\nwhich allows setting the entire error contents with a single string.
\n", - "params": [ - { - "type": "Array", - "name": "errors", - "doc": "The error messages
\n", - "optional": false - } - ], - "return": { - "type": "void", - "doc": "\n" - }, - "private": false, - "static": false, - "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/Labelable.js", - "linenr": 369, - "html_filename": "Labelable.html", - "href": "Labelable.html#Ext-form-Labelable-method-setActiveErrors", - "shortDoc": "Set the active error message to an Array of error messages. The messages are formatted into\na single message string u..." - }, - { - "tagname": "method", - "name": "setFieldDefaults", - "member": "Ext.form.Labelable", - "doc": "Applies a set of default configuration values to this Labelable instance. For each of the\nproperties in the given object, check if this component hasOwnProperty that config; if not\nthen it's inheriting a default value from its prototype and we should apply the default value.
\n", - "params": [ - { - "type": "Object", - "name": "defaults", - "doc": "The defaults to apply to the object.
\n", - "optional": false - } - ], - "return": { - "type": "void", - "doc": "\n" - }, - "private": false, - "static": false, - "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/Labelable.js", - "linenr": 417, - "html_filename": "Labelable.html", - "href": "Labelable.html#Ext-form-Labelable-method-setFieldDefaults", - "shortDoc": "Applies a set of default configuration values to this Labelable instance. For each of the\nproperties in the given obj..." - }, - { - "tagname": "method", - "name": "unsetActiveError", - "member": "Ext.form.Labelable", - "doc": "Clears the active error.
\n", - "params": [ - - ], - "return": { - "type": "void", - "doc": "\n" - }, - "private": false, - "static": false, - "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/Labelable.js", - "linenr": 381, - "html_filename": "Labelable.html", - "href": "Labelable.html#Ext-form-Labelable-method-unsetActiveError", - "shortDoc": "Clears the active error.
\n" - } - ], - "property": [ - { - "tagname": "property", - "name": "bodyEl", - "member": "Ext.form.Labelable", - "type": "Ext.core.Element", - "doc": "The div Element wrapping the component's contents. Only available after the component has been rendered.
\n", - "private": false, - "static": false, - "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/Labelable.js", - "linenr": 293, - "html_filename": "Labelable.html", - "href": "Labelable.html#Ext-form-Labelable-property-bodyEl" - }, - { - "tagname": "property", - "name": "errorEl", - "member": "Ext.form.Labelable", - "type": "Ext.core.Element", - "doc": "The div Element that will contain the component's error message(s). Note that depending on the\nconfigured msgTarget, this element may be hidden in favor of some other form of\npresentation, but will always be present in the DOM for use by assistive technologies.
\n", - "private": false, - "static": false, - "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/Labelable.js", - "linenr": 300, - "html_filename": "Labelable.html", - "href": "Labelable.html#Ext-form-Labelable-property-errorEl", - "shortDoc": "The div Element that will contain the component's error message(s). Note that depending on the\nconfigured msgTarget, ..." - }, - { - "tagname": "property", - "name": "isFieldLabelable", - "member": "Ext.form.Labelable", - "type": "Boolean", - "doc": "Flag denoting that this object is labelable as a field. Always true.
\n", - "private": false, - "static": false, - "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/Labelable.js", - "linenr": 61, - "html_filename": "Labelable.html", - "href": "Labelable.html#Ext-form-Labelable-property-isFieldLabelable" - }, - { - "tagname": "property", - "name": "labelEl", - "member": "Ext.form.Labelable", - "type": "Ext.core.Element", - "doc": "The label Element for this component. Only available after the component has been rendered.
\n", - "private": false, - "static": false, - "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/Labelable.js", - "linenr": 286, - "html_filename": "Labelable.html", - "href": "Labelable.html#Ext-form-Labelable-property-labelEl" - } - ], - "event": [ - { - "tagname": "event", - "name": "errorchange", - "member": "Ext.form.Labelable", - "doc": "Fires when the active error message is changed via setActiveError.
\n", - "params": [ - { - "type": "Ext.form.Labelable", - "name": "this", - "doc": "\n", - "optional": false - }, - { - "type": "String", - "name": "error", - "doc": "The active error message
\n", - "optional": false - } - ], - "private": false, - "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/Labelable.js", - "linenr": 222, - "html_filename": "Labelable.html", - "href": "Labelable.html#Ext-form-Labelable-event-errorchange", - "shortDoc": "Fires when the active error message is changed via setActiveError.
\n" - } - ], - "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/form/Labelable.js", - "linenr": 1, - "html_filename": "Labelable.html", - "href": "Labelable.html#Ext-form-Labelable", - "cssVar": [ - - ], - "cssMixin": [ - - ], - "component": false, - "superclasses": [ - - ], - "subclasses": [ - - ], - "mixedInto": [ - "Ext.form.field.Base", - "Ext.form.field.HtmlEditor", - "Ext.form.FieldContainer" - ], - "allMixins": [ - - ] -}); \ No newline at end of file +Ext.data.JsonP.Ext_form_Labelable({"tagname":"class","html":"Hierarchy
Ext.BaseExt.form.LabelableRequires
Files
A mixin which allows a component to be configured and decorated with a label and/or error message as is\ncommon for form fields. This is used by e.g. Ext.form.field.Base and Ext.form.FieldContainer\nto let them be managed by the Field layout.
\n\nNOTE: This mixin is mainly for internal library use and most users should not need to use it directly. It\nis more likely you will want to use one of the component classes that import this mixin, such as\nExt.form.field.Base or Ext.form.FieldContainer.
\n\nUse of this mixin does not make a component a field in the logical sense, meaning it does not provide any\nlogic or state related to values or validation; that is handled by the related Ext.form.field.Field\nmixin. These two mixins may be used separately (for example Ext.form.FieldContainer is Labelable but not a\nField), or in combination (for example Ext.form.field.Base implements both and has logic for connecting the\ntwo.)
\n\nComponent classes which use this mixin should use the Field layout\nor a derivation thereof to properly size and position the label and message according to the component config.\nThey must also call the initLabelable method during component initialization to ensure the mixin gets\nset up correctly.
\nIf specified, then the component will be displayed with this value as its active error when\nfirst rendered. Use setActiveError or unsetActiveError to\nchange it after component creation.
\nThe template used to format the Array of error messages passed to setActiveErrors\ninto a single HTML string. By default this renders each message as an item in an unordered list.
\nDefaults to: ["<tpl if="errors && errors.length">", "<ul><tpl for="errors"><li<tpl if="xindex == xcount"> class="last"</tpl>>{.}</li></tpl></ul>", "</tpl>"]
Whether to adjust the component's body area to make room for 'side' or 'under'\nerror messages.
\nDefaults to: true
The CSS class to be applied to the body content element.
\nDefaults to: "x-form-item-body"
The CSS class to be applied to the special clearing div rendered directly after the field\ncontents wrapper to provide field clearing.
\nDefaults to: "x-clear"
The CSS class to be applied to the error message element.
\nDefaults to: "x-form-error-msg"
An extra CSS class to be applied to the body content element in addition to fieldBodyCls.
\nDefaults to: ""
The label for the field. It gets appended with the labelSeparator, and its position\nand sizing is determined by the labelAlign, labelWidth, and labelPad\nconfigs.
\nA CSS class to be applied to the outermost element to denote that it is participating in the form\nfield layout.
\nDefaults to: "x-form-item"
When set to true, the label element (fieldLabel and labelSeparator) will be\nautomatically hidden if the fieldLabel is empty. Setting this to false will cause the empty\nlabel element to be rendered and space to be reserved for it; this is useful if you want a field without a label\nto line up with other labeled fields in the same form.
\n\n\nIf you wish to unconditionall hide the label even if a non-empty fieldLabel is configured, then set\nthe hideLabel config to true.
\n\nDefaults to: true
Set to true to completely hide the label element (fieldLabel and labelSeparator).\nAlso see hideEmptyLabel, which controls whether space will be reserved for an empty fieldLabel.
\nDefaults to: false
The CSS class to use when marking the component invalid.
\nDefaults to: "x-form-invalid"
Controls the position and alignment of the fieldLabel. Valid values are:
\n\n\nDefaults to: "left"
The CSS class to be applied to the label element.\nThis (single) CSS class is used to formulate the renderSelector and drives the field\nlayout where it is concatenated with a hyphen ('-') and labelAlign. To add\nadditional classes, use labelClsExtra.
\nDefaults to: "x-form-item-label"
An optional string of one or more additional CSS classes to add to the label element.\nDefaults to empty.
\nThe amount of space in pixels between the fieldLabel and the input field.
\nDefaults to: 5
Character(s) to be inserted at the end of the label text.
\nDefaults to: ":"
A CSS style specification string to apply directly to this field's label.
\nA CSS style specification string to apply directly to this field's label.
\nThe width of the fieldLabel in pixels. Only applicable if the labelAlign is set\nto \"left\" or \"right\".
\nDefaults to: 100
The rendering template for the field decorations. Component classes using this mixin should include\nlogic to use this as their renderTpl, and implement the\ngetSubTplMarkup method to generate the field body content.
\nDefaults to: ["<tpl if="!hideLabel && !(!fieldLabel && hideEmptyLabel)">", "<label id="{id}-labelEl"<tpl if="inputId"> for="{inputId}"</tpl> class="{labelCls}"", "<tpl if="labelStyle"> style="{labelStyle}"</tpl>>", "<tpl if="fieldLabel">{fieldLabel}{labelSeparator}</tpl>", "</label>", "</tpl>", "<div class="{baseBodyCls} {fieldBodyCls}" id="{id}-bodyEl" role="presentation">{subTplMarkup}</div>", "<div id="{id}-errorEl" class="{errorMsgCls}" style="display:none"></div>", "<div class="{clearCls}" role="presentation"><!-- --></div>", {compiled: true, disableFormats: true}]
The location where the error message text should display.\nMust be one of the following values:
\n\n\nqtip
Display a quick tip containing the message when the user hovers over the field. This is the default.\ntitle
Display the message in a default browser title attribute popup.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.none
Don't display any error message. This might be useful if you are implementing custom error display.[element id]
Add the error message directly to the innerHTML of the specified element.Defaults to: "qtip"
true to disable displaying any error message set on this object.
\nDefaults to: false
The div Element wrapping the component's contents. Only available after the component has been rendered.
\nThe div Element that will contain the component's error message(s). Note that depending on the\nconfigured msgTarget, this element may be hidden in favor of some other form of\npresentation, but will always be present in the DOM for use by assistive technologies.
\nFlag denoting that this object is labelable as a field. Always true.
\nThe label Element for this component. Only available after the component has been rendered.
\nGet the reference to the current class from which this object was instantiated. Unlike statics,\nthis.self
is scope-dependent and it's meant to be used for dynamic inheritance. See statics\nfor a detailed comparison
Ext.define('My.Cat', {\n statics: {\n speciesName: 'Cat' // My.Cat.speciesName = 'Cat'\n },\n\n constructor: function() {\n alert(this.self.speciesName); / dependent on 'this'\n\n return this;\n },\n\n clone: function() {\n return new this.self();\n }\n});\n\n\nExt.define('My.SnowLeopard', {\n extend: 'My.Cat',\n statics: {\n speciesName: 'Snow Leopard' // My.SnowLeopard.speciesName = 'Snow Leopard'\n }\n});\n\nvar cat = new My.Cat(); // alerts 'Cat'\nvar snowLeopard = new My.SnowLeopard(); // alerts 'Snow Leopard'\n\nvar clone = snowLeopard.clone();\nalert(Ext.getClassName(clone)); // alerts 'My.SnowLeopard'\n
\nCall the original method that was previously overridden with override
\n\nExt.define('My.Cat', {\n constructor: function() {\n alert(\"I'm a cat!\");\n\n return this;\n }\n});\n\nMy.Cat.override({\n constructor: function() {\n alert(\"I'm going to be a cat!\");\n\n var instance = this.callOverridden();\n\n alert(\"Meeeeoooowwww\");\n\n return instance;\n }\n});\n\nvar kitty = new My.Cat(); // alerts \"I'm going to be a cat!\"\n // alerts \"I'm a cat!\"\n // alerts \"Meeeeoooowwww\"\n
\nThe arguments, either an array or the arguments
object
Returns the result after calling the overridden method
\nCall the parent's overridden method. For example:
\n\nExt.define('My.own.A', {\n constructor: function(test) {\n alert(test);\n }\n});\n\nExt.define('My.own.B', {\n extend: 'My.own.A',\n\n constructor: function(test) {\n alert(test);\n\n this.callParent([test + 1]);\n }\n});\n\nExt.define('My.own.C', {\n extend: 'My.own.B',\n\n constructor: function() {\n alert(\"Going to call parent's overriden constructor...\");\n\n this.callParent(arguments);\n }\n});\n\nvar a = new My.own.A(1); // alerts '1'\nvar b = new My.own.B(1); // alerts '1', then alerts '2'\nvar c = new My.own.C(2); // alerts \"Going to call parent's overriden constructor...\"\n // alerts '2', then alerts '3'\n
\nThe arguments, either an array or the arguments
object\nfrom the current method, for example: this.callParent(arguments)
Returns the result from the superclass' method
\nGets the active error message for this component, if any. This does not trigger\nvalidation on its own, it merely returns any message that the component may already hold.
\nThe active error message on the component; if there is no error, an empty string is returned.
\nGets an Array of any active error messages currently applied to the field. This does not trigger\nvalidation on its own, it merely returns any messages that the component may already hold.
\nThe active error messages on the component; if there are no errors, an empty Array is returned.
\nCalculate and return the natural width of the bodyEl. Override to provide custom logic.\nNote for implementors: if at all possible this method should be overridden with a custom implementation\nthat can avoid anything that would cause the browser to reflow, e.g. querying offsetWidth.
\nReturns the label for the field. Defaults to simply returning the fieldLabel config. Can be\noverridden to provide
\nThe configured field label, or empty string if not defined
\nGet the input id, if any, for this component. This is used as the \"for\" attribute on the label element.\nImplementing subclasses may also use this as e.g. the id for their own input element.
\nThe input id
\nGenerates the arguments for the field decorations rendering template.
\nThe template arguments
\nGets the markup to be inserted into the outer template's bodyEl. Defaults to empty string, should\nbe implemented by classes including this mixin as needed.
\nThe markup to be inserted
\nTells whether the field currently has an active error message. This does not trigger\nvalidation on its own, it merely looks for any message that the component may already hold.
\nInitialize configuration for this class. a typical example:
\n\nExt.define('My.awesome.Class', {\n // The default config\n config: {\n name: 'Awesome',\n isAwesome: true\n },\n\n constructor: function(config) {\n this.initConfig(config);\n\n return this;\n }\n});\n\nvar awesome = new My.awesome.Class({\n name: 'Super Awesome'\n});\n\nalert(awesome.getName()); // 'Super Awesome'\n
\nmixins The mixin prototypes as key - value pairs
\nPerforms initialization of this mixin. Component classes using this mixin should call this method\nduring their own initialization.
\nSets the active error message to the given string. This replaces the entire error message\ncontents with the given string. Also see setActiveErrors which accepts an Array of\nmessages and formats them according to the activeErrorsTpl.
\n\nNote that this only updates the error message element's text and attributes, you'll have\nto call doComponentLayout to actually update the field's layout to match. If the field extends\nExt.form.field.Base you should call markInvalid instead.
\nThe error message
\nSet the active error message to an Array of error messages. The messages are formatted into\na single message string using the activeErrorsTpl. Also see setActiveError\nwhich allows setting the entire error contents with a single string.
\n\nNote that this only updates the error message element's text and attributes, you'll have\nto call doComponentLayout to actually update the field's layout to match. If the field extends\nExt.form.field.Base you should call markInvalid instead.
\nThe error messages
\nApplies a set of default configuration values to this Labelable instance. For each of the\nproperties in the given object, check if this component hasOwnProperty that config; if not\nthen it's inheriting a default value from its prototype and we should apply the default value.
\nThe defaults to apply to the object.
\nGet the reference to the class from which this object was instantiated. Note that unlike self,\nthis.statics()
is scope-independent and it always returns the class from which it was called, regardless of what\nthis
points to during run-time
Ext.define('My.Cat', {\n statics: {\n totalCreated: 0,\n speciesName: 'Cat' // My.Cat.speciesName = 'Cat'\n },\n\n constructor: function() {\n var statics = this.statics();\n\n alert(statics.speciesName); // always equals to 'Cat' no matter what 'this' refers to\n // equivalent to: My.Cat.speciesName\n\n alert(this.self.speciesName); // dependent on 'this'\n\n statics.totalCreated++;\n\n return this;\n },\n\n clone: function() {\n var cloned = new this.self; // dependent on 'this'\n\n cloned.groupName = this.statics().speciesName; // equivalent to: My.Cat.speciesName\n\n return cloned;\n }\n});\n\n\nExt.define('My.SnowLeopard', {\n extend: 'My.Cat',\n\n statics: {\n speciesName: 'Snow Leopard' // My.SnowLeopard.speciesName = 'Snow Leopard'\n },\n\n constructor: function() {\n this.callParent();\n }\n});\n\nvar cat = new My.Cat(); // alerts 'Cat', then alerts 'Cat'\n\nvar snowLeopard = new My.SnowLeopard(); // alerts 'Cat', then alerts 'Snow Leopard'\n\nvar clone = snowLeopard.clone();\nalert(Ext.getClassName(clone)); // alerts 'My.SnowLeopard'\nalert(clone.groupName); // alerts 'Cat'\n\nalert(My.Cat.totalCreated); // alerts 3\n
\nClears the active error message(s).
\n\nNote that this only clears the error message element's text and attributes, you'll have\nto call doComponentLayout to actually update the field's layout to match. If the field extends\nExt.form.field.Base you should call clearInvalid instead.
\nAdd / override static properties of this class.
\n\nExt.define('My.cool.Class', {\n ...\n});\n\nMy.cool.Class.addStatics({\n someProperty: 'someValue', // My.cool.Class.someProperty = 'someValue'\n method1: function() { ... }, // My.cool.Class.method1 = function() { ... };\n method2: function() { ... } // My.cool.Class.method2 = function() { ... };\n});\n
\nthis
\nBorrow another class' members to the prototype of this class.
\n\nExt.define('Bank', {\n money: '$$$',\n printMoney: function() {\n alert('$$$$$$$');\n }\n});\n\nExt.define('Thief', {\n ...\n});\n\nThief.borrow(Bank, ['money', 'printMoney']);\n\nvar steve = new Thief();\n\nalert(steve.money); // alerts '$$$'\nsteve.printMoney(); // alerts '$$$$$$$'\n
\nThe class to borrow members from
\nThe names of the members to borrow
\nthis
\nCreate a new instance of this Class.
\n\nExt.define('My.cool.Class', {\n ...\n});\n\nMy.cool.Class.create({\n someConfig: true\n});\n
\n\nAll parameters are passed to the constructor of the class.
\nthe created instance.
\nCreate aliases for existing prototype methods. Example:
\n\nExt.define('My.cool.Class', {\n method1: function() { ... },\n method2: function() { ... }\n});\n\nvar test = new My.cool.Class();\n\nMy.cool.Class.createAlias({\n method3: 'method1',\n method4: 'method2'\n});\n\ntest.method3(); // test.method1()\n\nMy.cool.Class.createAlias('method5', 'method3');\n\ntest.method5(); // test.method3() -> test.method1()\n
\nThe new method name, or an object to set multiple aliases. See\nflexSetter
\nThe original method name
\nGet the current class' name in string format.
\n\nExt.define('My.cool.Class', {\n constructor: function() {\n alert(this.self.getName()); // alerts 'My.cool.Class'\n }\n});\n\nMy.cool.Class.getName(); // 'My.cool.Class'\n
\nclassName
\nAdd methods / properties to the prototype of this class.
\n\nExt.define('My.awesome.Cat', {\n constructor: function() {\n ...\n }\n});\n\n My.awesome.Cat.implement({\n meow: function() {\n alert('Meowww...');\n }\n });\n\n var kitty = new My.awesome.Cat;\n kitty.meow();\n
\nOverride prototype members of this class. Overridden methods can be invoked via\ncallOverridden
\n\nExt.define('My.Cat', {\n constructor: function() {\n alert(\"I'm a cat!\");\n\n return this;\n }\n});\n\nMy.Cat.override({\n constructor: function() {\n alert(\"I'm going to be a cat!\");\n\n var instance = this.callOverridden();\n\n alert(\"Meeeeoooowwww\");\n\n return instance;\n }\n});\n\nvar kitty = new My.Cat(); // alerts \"I'm going to be a cat!\"\n // alerts \"I'm a cat!\"\n // alerts \"Meeeeoooowwww\"\n
\nthis
\nFires when the active error message is changed via setActiveError.
\nThe active error message
\nThe options object passed to Ext.util.Observable.addListener.
\n\n\n\n