A.BaseOptionsCellEditor Class
Abstract class A.BaseOptionsCellEditor
for options attribute support.
Constructor
A.BaseOptionsCellEditor
-
config
Parameters:
-
config
ObjectObject literal specifying widget configuration properties.
Index
Methods
- _addAttrs
- _addLazyAttr
- _addOutOfOrder
- _addShimResizeHandlers
- _addStdModContent
- _afterAlignChange
- _afterAlignOnChange
- _afterBodyChange
- _afterChildSelectedChange
- _afterConstrainChange
- _afterFillHeightChange
- _afterFooterChange
- _afterHeaderChange
- _afterRender
- _afterShimChange
- _afterXYChange
- _afterZIndexChange
- _aggregateAttrs
- _applyParsedConfig
- _applyParser
- _applyStdModParsedConfig
- _attachPosAlignUIHandles
- _attrCfgHash
- _baseDestroy
- _baseInit
- _bindAttrUI
- _bindDOM
- _bindUI
- _bindUIChild
- _bindUIInputTextControl
- _bindUIPosAlign
- _bindUIPosConstrained
- _bindUIPosition
- _bindUIStack
- _bindUIStdMod
- _clearInterval
- _clearSelection
- _cloneDefaultValue
- _constrain
- _constrainOnXYChange
- _createEditBuffer
- _createEditOption
- _createEditor
- _createOptions
- _createUIEvent
- _debounceVisibleChange
- _defAttrChangeFn
- _defaultBB
- _defaultCB
- _defCancelFn
- _defDestroyFn
- _defInitEditFn
- _defInitFn
- _defInitToolbarFn
- _defInitValidatorFn
- _defRenderFn
- _defSaveFn
- _destroyBox
- _destroyHierarchy
- _destroyShim
- _destroyUIEvents
- _detachPosAlignUIHandles
- _detachStackHandles
- _doAlign
- _enableConstraints
- _enableIntervalDetection
- _eraseStdMod
- _extractQuery
- _fillHeight
- _filterAdHocAttrs
- _filterUIEvent
- _findStdModSection
- _fireAttrChange
- _focus
- _getAlignedXY
- _getAlignToXY
- _getAttr
- _getAttrCfg
- _getAttrCfgs
- _getAttrInitVal
- _getAttrs
- _getClasses
- _getFullType
- _getHtmlParser
- _getInstanceAttrCfgs
- _getNodeToParse
- _getPreciseHeight
- _getRegion
- _getSelectedOptions
- _getShimTemplate
- _getSrcNode
- _getStateVal
- _getStdModContent
- _getStdModTemplate
- _getType
- _getUIEventNode
- _getX
- _getY
- _guid
- _handleCancelEvent
- _handleEditEvent
- _handleInitEditEvent
- _handleInitToolbarEvent
- _handleInitValidatorEvent
- _handleSaveEvent
- _hasPotentialSubscribers
- _initAttrHost
- _initAttribute
- _initAttrs
- _initBase
- _initEvents
- _initHierarchy
- _initHierarchyData
- _initUIEvent
- _insertStdModSection
- _isLazyAttr
- _isUIEvent
- _mapInstance
- _monitor
- _normAttrVals
- _onButtonMouseDown
- _onDocFocus
- _onDocMouseDown
- _onDocMouseDownExt
- _onEditEvent
- _onEditKeyEvent
- _onEditLinkClickEvent
- _onEscKey
- _onInterval
- _onSave
- _onSubmit
- _onTextboxBlur
- _onTextboxFocus
- _onTextboxKeyDown
- _onTextboxKeyPress
- _onTextboxKeyUp
- _parseStdModHTML
- _parseType
- _parseZIndex
- _preAddAttrs
- _preInitEventCfg
- _preventOverlap
- _protectAttrs deprecated
- _publish
- _removeLoadingClassNames
- _renderBox
- _renderBoxClassNames
- _renderInput
- _renderShim
- _renderShimDeferred
- _renderStdMod
- _renderUI
- _renderUIInputTextControl
- _renderUIPosition
- _renderUIStack
- _renderUIStdMod
- _sendQuery
- _set
- _setAlignCenter
- _setAttr
- _setAttrs
- _setAttrUI
- _setAttrVal
- _setBB
- _setBox
- _setCB
- _setConstrain
- _setOptions
- _setStateVal
- _setToolbar
- _setValidator
- _setX
- _setY
- _setZIndex
- _simulateDrag
- _simulateInputChange
- _strSetter
- _syncAttrUI
- _syncEditOptionsUI
- _syncElementsFocus
- _syncElementsName
- _syncFocus
- _syncUI
- _syncUIChild
- _syncUIPosAlign
- _syncUIPosition
- _syncUIStack
- _syncUIStdMod
- _typeAhead
- _uiSetAlign
- _uiSetChildSelected
- _uiSetDim
- _uiSetDisabled
- _uiSetEditable
- _uiSetFillHeight
- _uiSetFocused
- _uiSetHeight
- _uiSetOptions
- _uiSetShim
- _uiSetShowToolbar
- _uiSetStdMod
- _uiSetTabIndex
- _uiSetValue
- _uiSetVisible
- _uiSetVisiblePosAlign
- _uiSetWidth
- _uiSetXY
- _uiSetZIndex
- _uiSizeCB
- _unbindDOM
- _unbindUI
- _validateFillHeight
- _validateXY
- _validTabIndex
- addAttr
- addAttrs
- addNewOption
- addTarget
- after
- align
- ancestor
- attrAdded
- before
- bindUI
- blur
- bubble
- centered
- constrain
- destroy
- destructor
- detach
- detachAll
- disable
- doBeforeLoadData
- enable
- fillHeight
- fire
- focus
- formatResult
- formatValue
- generateRequest
- get
- getAttrs
- getClassName
- getConstrainedXY
- getElementsValue
- getEvent
- getSkinName
- getStdModNode
- getString deprecated
- getStrings deprecated
- getTargets
- getValue
- handleResponse
- hide
- init
- initializer
- isRoot
- modifyAttr
- move
- next
- on
- once
- onceAfter
- parseType
- previous
- publish
- removeAttr
- removeOption
- removeTarget
- render
- renderer
- renderUI
- reset
- saveOptions
- set
- setAttrs
- setStdModContent
- show
- sizeShim
- subscribe deprecated
- syncUI
- syncXY
- toggleEdit
- toString
- unsubscribe deprecated
- unsubscribeAll deprecated
Properties
- _allowAdHocAttrs
- _posAlignUIHandles
- _UI_ATTRS
- ATTRS static
- BOUNDING_TEMPLATE
- CONTENT_TEMPLATE
- DEF_PARENT_NODE
- DEF_UNIT
- EXTENDS static
- NAME static
- name deprecated
- UI_ATTRS static
- UI_EVENTS
Attributes
- align
- alignOn
- bodyContent
- boundingBox
- button
- centered
- constrain
- contentBox
- dataSource
- dataSourceType
- delimChar
- destroyed
- disabled
- editable
- elementName
- fillHeight
- focused
- footerContent
- forceSelection
- headerContent
- height
- hideEditContainerOnSave
- hideOnSave
- id
- initialized
- input
- inputFormatter
- matchKey
- minQueryLength
- options
- optionsValidatorCustomRules
- optionsValidatorInputRules
- outputFormatter
- preventOverlap
- queryDelay
- queryInterval
- queryMatchCase
- queryMatchContains
- queryQuestionMark
- render
- rendered
- schema
- schemaType
- selectedAttrName
- shim
- showToolbar
- srcNode
- strings
- suppressInputUpdate
- tabIndex
- toolbar
- typeAhead
- typeAheadDelay
- unescapeValue
- uniqueName
- validator
- value
- visible
- width
- x
- xy
- y
- zIndex
Methods
_addAttrs
-
cfgs
-
values
-
lazy
Implementation behind the public addAttrs method.
This method is invoked directly by get if it encounters a scenario in which an attribute's valueFn attempts to obtain the value an attribute in the same group of attributes, which has not yet been added (on demand initialization).
Parameters:
-
cfgs
Object<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>An object with attribute name/configuration pairs.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
values
Object<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>An object with attribute name/value pairs, defining the initial values to apply. Values defined in the cfgs argument will be over-written by values in this argument unless defined as read only.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
lazy
Boolean<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>Whether or not to delay the intialization of these attributes until the first call to get/set. Individual attributes can over-ride this behavior by defining a lazyAdd configuration property in their configuration. See <a href="#method_addAttr">addAttr</a>.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_addLazyAttr
-
name
-
[lazyCfg]
Finishes initializing an attribute which has been lazily added.
Parameters:
-
name
Object<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The name of the attribute</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
[lazyCfg]
Object optional<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>Optional config hash for the attribute. This is added for performance along the critical path, where the calling method has already obtained lazy config from state.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_addOutOfOrder
-
name
-
cfg
Utility method used by get/set to add attributes encountered out of order when calling addAttrs().
For example, if:
this.addAttrs({
foo: {
setter: function() {
// make sure this bar is available when foo is added
this.get("bar");
}
},
bar: {
value: ...
}
});
Parameters:
-
name
String<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>attribute name</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
cfg
Object<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>attribute configuration</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_addShimResizeHandlers
()
private
Sets up event listeners to resize the shim when the size of the Widget changes. <p> NOTE: This method is only used for IE6 currently, since IE6 doesn't support a way to resize the shim purely through CSS, when the Widget does not have an explicit width/height set. </p>
_addStdModContent
-
node
-
children
-
where
Helper method to add content to a StdMod section node. The content is added either before, after or replaces the existing node content based on the value of the <code>where</code> argument.
Parameters:
-
node
Node<p><p><p>The section Node to be updated.</p></p></p>
-
children
Node | NodeList | String<p><p><p>The new content Node, NodeList or String to be added to section Node provided.</p></p></p>
-
where
String<p><p><p>Optional. Either WidgetStdMod.AFTER, WidgetStdMod.BEFORE or WidgetStdMod.REPLACE. If not provided, the content will replace existing content in the Node.</p></p></p>
_afterAlignChange
-
e
Handles alignChange
events by updating the UI in response to align
Attribute changes.
Parameters:
_afterAlignOnChange
-
e
Handles alignOnChange
events by updating the alignment-syncing event
handlers.
Parameters:
_afterBodyChange
-
e
Default attribute change listener for the bodyContent attribute, responsible for updating the UI, in response to attribute changes.
Parameters:
-
e
EventFacade<p><p><p>The event facade for the attribute change</p></p></p>
_afterChildSelectedChange
-
event
Default attribute change listener for the <code>selected</code> attribute, responsible for updating the UI, in response to attribute changes.
Parameters:
-
event
EventFacade<p><p><p><p><p><p><p><p><p><p><p><p>The event facade for the attribute change.</p></p></p></p></p></p></p></p></p></p></p></p>
_afterConstrainChange
-
e
After change listener for the "constrain" attribute, responsible for updating the UI, in response to attribute changes.
Parameters:
-
e
EventFacade<p><p><p>The event facade</p></p></p>
_afterFillHeightChange
-
e
Default attribute change listener for the fillHeight attribute, responsible for updating the UI, in response to attribute changes.
Parameters:
-
e
EventFacade<p><p><p>The event facade for the attribute change</p></p></p>
_afterHeaderChange
-
e
Default attribute change listener for the headerContent attribute, responsible for updating the UI, in response to attribute changes.
Parameters:
-
e
EventFacade<p><p><p>The event facade for the attribute change</p></p></p>
_afterRender
()
protected
<p>Fires after the <code>render</code> event. Initializes validation and toolbar.</p>
_afterShimChange
-
e
Default attribute change listener for the shim attribute, responsible for updating the UI, in response to attribute changes.
Parameters:
-
e
EventFacade<p><p><p>The event facade for the attribute change</p></p></p>
_afterXYChange
-
e
Default attribute change listener for the xy attribute, responsible for updating the UI, in response to attribute changes.
Parameters:
-
e
EventFacade<p><p><p>The event facade for the attribute change</p></p></p>
_afterZIndexChange
-
e
Default attribute change listener for the zIndex attribute, responsible for updating the UI, in response to attribute changes.
Parameters:
-
e
EventFacade<p><p><p>The event facade for the attribute change</p></p></p>
_aggregateAttrs
-
allAttrs
A helper method, used by _initHierarchyData to aggregate attribute configuration across the instances class hierarchy.
The method will protect the attribute configuration value to protect the statically defined default value in ATTRS if required (if the value is an object literal, array or the attribute configuration has cloneDefaultValue set to shallow or deep).
Parameters:
-
allAttrs
Array<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>An array of ATTRS definitions across classes in the hierarchy (subclass first, Base last)</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The aggregate set of ATTRS definitions for the instance</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_applyParsedConfig
()
Object
protected
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p>The merged configuration literal</p></p></p></p></p></p></p></p></p></p></p></p>
_applyParser
-
config
Utility method used to apply the <code>HTML_PARSER</code> configuration for the instance, to retrieve config data values.
Parameters:
-
config
Object<p><p><p><p><p><p><p><p><p><p><p><p>User configuration object (will be populated with values from Node)</p></p></p></p></p></p></p></p></p></p></p></p>
_applyStdModParsedConfig
()
private
This method is injected before the _applyParsedConfig step in the application of HTML_PARSER, and sets up the state to identify whether or not we should remove the current DOM content or not, based on whether or not the current content attribute value was extracted from the DOM, or provided by the user configuration
_attachPosAlignUIHandles
()
protected
Attaches the alignment-syncing event handlers.
_attrCfgHash
()
private
Utility method to define the attribute hash used to filter/whitelist property mixes for this class for iteration performance reasons.
_baseDestroy
()
private
Internal destroy implementation for BaseCore
_baseInit
()
private
Internal initialization implementation for BaseCore
_bindAttrUI
-
attrs
Binds after listeners for the list of attributes provided
Parameters:
-
attrs
Array
_bindDOM
()
protected
Sets up DOM listeners, on elements rendered by the widget.
_bindUI
()
protected
Sets up DOM and CustomEvent listeners for the widget.
_bindUIChild
()
protected
Binds event listeners responsible for updating the UI state in response to WidgetChild related state changes. <p> This method is invoked after bindUI is invoked for the Widget class using YUI's aop infrastructure. </p>
_bindUIInputTextControl
()
protected
<p>Bind the events on the InputTextControl UI. Lifecycle.</p>
_bindUIPosAlign
()
protected
Bind event listeners responsible for updating the UI state in response to the widget's position-align related state changes.
This method is invoked after bindUI
has been invoked for the Widget
class using the AOP infrastructure.
_bindUIPosConstrained
()
protected
Binds event listeners responsible for updating the UI state in response to Widget constrained positioning related state changes. <p> This method is invoked after bindUI is invoked for the Widget class using YUI's aop infrastructure. </p>
_bindUIPosition
()
protected
Binds event listeners responsible for updating the UI state in response to Widget position related state changes. <p> This method in invoked after bindUI is invoked for the Widget class using YUI's aop infrastructure. </p>
_bindUIStack
()
protected
Binds event listeners responsible for updating the UI state in response to Widget stack related state changes. <p> This method is invoked after bindUI is invoked for the Widget class using YUI's aop infrastructure. </p>
_bindUIStdMod
()
protected
Binds event listeners responsible for updating the UI state in response to Widget standard module related state changes. <p> This method is invoked after bindUI is invoked for the Widget class using YUI's aop infrastructure. </p>
_clearInterval
()
private
<p>Clears the query interval</p>
_clearSelection
()
protected
<p>When <a href="Autocomplete.html#config_forceSelection">forceSelection</a> is true and the user tries to leave the input element without selecting an item from the results, the user selection is cleared.</p>
_cloneDefaultValue
-
cfg
This method assumes that the value has already been checked to be an object. Since it's on a critical path, we don't want to re-do the check.
Parameters:
-
cfg
Object
_constrain
-
val
-
axis
-
nodeRegion
-
constrainingRegion
The method which performs the actual constrain calculations for a given axis ("x" or "y") based on the regions provided.
Parameters:
-
val
Number<p><p><p>The value to constrain</p></p></p>
-
axis
String<p><p><p>The axis to use for constrainment</p></p></p>
-
nodeRegion
Region<p><p><p>The region of the node to constrain</p></p></p>
-
constrainingRegion
Region<p><p><p>The region of the node (or viewport) to constrain to</p></p></p>
Returns:
<p><p><p>The constrained value</p></p></p>
_constrainOnXYChange
-
e
The on change listener for the "xy" attribute. Modifies the event facade's newVal property with the constrained XY value.
Parameters:
-
e
EventFacade<p><p><p>The event facade for the attribute change</p></p></p>
_createEditBuffer
()
String
protected
Create edit buffer.
Returns:
HTML string for the A.BaseOptionsCellEditor
.
_createEditOption
-
name
-
value
Create Edit option.
Parameters:
-
name
String -
value
String
Returns:
HTML string for the A.BaseOptionsCellEditor
input
option.
_createEditor
-
config
<p>Creates a <code>Y.TabsDataEditor</code> using the given configuration object, or a default configuration if none is given.</p>
Parameters:
-
config
Object
Returns:
_createOptions
-
val
Creates option elements and stores a reference to them in
the option
property.
TODO. Rewrite this method.
Parameters:
-
val
Array
_createUIEvent
-
type
Binds a delegated DOM event listener of the specified type to the Widget's outtermost DOM element to facilitate the firing of a Custom Event of the same type for the Widget instance.
Parameters:
-
type
String<p><p><p><p><p><p><p><p><p><p><p><p>String representing the name of the event</p></p></p></p></p></p></p></p></p></p></p></p>
_debounceVisibleChange
-
event
<p>Fires after the <code>visibleChange</code> event. Binds the <code>mousedown</code> event listener and <code>keydown</code> event listener for the escape key.</p> <p>See: <code>_onDocMouseDownExt</code> and <code>_onEscKey</code> for details.</p>
Parameters:
-
event
EventFacade
_defAttrChangeFn
-
e
-
eventFastPath
Default function for attribute change events.
Parameters:
-
e
EventFacade<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The event object for attribute change events.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
eventFastPath
Boolean<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>Whether or not we're using this as a fast path in the case of no listeners or not</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_defaultBB
()
protected
Returns the default value for the boundingBox attribute.
For the Widget class, this will most commonly be null (resulting in a new boundingBox node instance being created), unless a srcNode was provided and CONTENT_TEMPLATE is null, in which case it will be srcNode. This behavior was introduced in @VERSION@ to accomodate single-box widgets whose BB & CB both point to srcNode (e.g. Y.Button).
_defaultCB
()
protected
Returns the default value for the contentBox attribute.
For the Widget class, this will be the srcNode if provided, otherwise null (resulting in a new contentBox node instance being created)
_defCancelFn
-
event
<p>Default callback for the <code>cancel</code> event. Hides the <code>A.BaseCellEditor</code>.</p>
Parameters:
-
event
EventFacade
_defDestroyFn
-
e
Default destroy event handler
Parameters:
-
e
EventFacade<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>Event object</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_defInitEditFn
-
event
Default callback for initEdit
event of A.BaseOptionsCellEditor
.
Parameters:
-
event
EventFacade
_defInitFn
-
e
Default init event handler
Parameters:
-
e
EventFacade<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>Event object, with a cfg property which refers to the configuration object passed to the constructor.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_defInitToolbarFn
-
event
<p>Default callback for the <code>initToolbar</code> event. Initializes the <code>Toolbar</code> using the config from the <code>toolbar</code> attribute.</p>
Parameters:
-
event
EventFacade
_defInitValidatorFn
-
event
<p>Default callback for the <code>initValidator</code> event. Initializes the <code>FormValidator</code> using the config from the <code>validator</code> attribute.</p>
Parameters:
-
event
EventFacade
_defRenderFn
-
e
-
parentNode
Default render handler
Parameters:
-
e
EventFacade<p><p><p><p><p><p><p><p><p><p><p><p>The Event object</p></p></p></p></p></p></p></p></p></p></p></p>
-
parentNode
Node<p><p><p><p><p><p><p><p><p><p><p><p>The parent node to render to, if passed in to the <code>render</code> method</p></p></p></p></p></p></p></p></p></p></p></p>
_defSaveFn
-
event
<p>Default callback for the <code>save</code> event. Conditionally hides the <code>A.BaseCellEditor</code> based on the <code>hideOnSave</code> attribute.</p>
Parameters:
-
event
EventFacade
_destroyBox
()
protected
Removes and destroys the widgets rendered boundingBox, contentBox, and detaches bound UI events.
_destroyHierarchy
()
private
Destroys the class hierarchy for this instance by invoking the destructor method on the prototype of each class in the hierarchy.
_destroyShim
()
private
Removes the shim from the DOM, and detaches any related event listeners.
_destroyUIEvents
()
private
Destructor logic for UI event infrastructure, invoked during Widget destruction.
_detachPosAlignUIHandles
()
protected
Detaches the alignment-syncing event handlers.
_detachStackHandles
-
String
Detaches any handles stored for the provided key
Parameters:
-
String
Object<p><p><p>handleKey The key defining the group of handles which should be detached</p></p></p>
_doAlign
-
xy
Helper method, used to align the given point on the widget, with the XY page coordinates provided.
Parameters:
-
xy
Array<p><p><p>XY page coordinates to align to.</p></p></p>
_enableConstraints
-
enable
Updates the UI if enabling constraints, and sets up the xyChange event listeners to constrain whenever the widget is moved. Disabling constraints removes the listeners.
Parameters:
-
enable
Boolean<p><p><p>Enable or disable constraints</p></p></p>
_enableIntervalDetection
()
protected
<p>Enables query interval detection for IME support.</p>
_eraseStdMod
-
section
Removes the DOM node for the given section.
Parameters:
-
section
String<p><p><p>The section to remove. Either WidgetStdMod.HEADER, WidgetStdMod.BODY or WidgetStdMod.FOOTER.</p></p></p>
_extractQuery
-
query
<p>Extracts the right most query from the delimited string in the input.</p>
Parameters:
-
query
String<p>String to parse</p>
Returns:
_fillHeight
()
private
Updates the rendered UI, to resize the current section specified by the fillHeight attribute, so that the standard module fills out the Widget height. If a height has not been set on Widget, the section is not resized (height is set to "auto").
_filterAdHocAttrs
-
allAttrs
-
userVals
Parameters:
-
allAttrs
Object<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The set of all attribute configurations for this instance. Attributes will be removed from this set, if they belong to the filtered class, so that by the time all classes are processed, allCfgs will be empty.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
userVals
Object<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The config object passed in by the user, from which adhoc attrs are to be filtered.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The set of adhoc attributes passed in, in the form of an object with attribute name/configuration pairs.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_filterUIEvent
-
evt
This method is used to determine if we should fire the UI Event or not. The default implementation makes sure that for nested delegates (nested unrelated widgets), we don't fire the UI event listener more than once at each level.
<p>For example, without the additional filter, if you have nested widgets, each widget will have a delegate listener. If you click on the inner widget, the inner delegate listener's filter will match once, but the outer will match twice (based on delegate's design) - once for the inner widget, and once for the outer.</p>
Parameters:
-
evt
DOMEventFacade
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p>true if it's OK to fire the custom UI event, false if not.</p></p></p></p></p></p></p></p></p></p></p></p>
_findStdModSection
-
section
Helper method to to find the rendered node for the given section, if it exists.
Parameters:
-
section
String<p><p><p>The section for which the render Node is to be found. Either WidgetStdMod.HEADER, WidgetStdMod.BODY or WidgetStdMod.FOOTER.</p></p></p>
Returns:
<p><p><p>The rendered node for the given section, or null if not found.</p></p></p>
_fireAttrChange
-
attrName
-
subAttrName
-
currVal
-
newVal
-
opts
-
[cfg]
Utility method to help setup the event payload and fire the attribute change event.
Parameters:
-
attrName
String<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The name of the attribute</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
subAttrName
String<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The full path of the property being changed, if this is a sub-attribute value being change. Otherwise null.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
currVal
Any<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The current value of the attribute</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
newVal
Any<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The new value of the attribute</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
opts
Object<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>Any additional event data to mix into the attribute change event's event facade.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
[cfg]
Object optional<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The attribute config stored in State, if already available.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_focus
()
protected
<p>Focuses the input element.</p>
_getAlignedXY
-
[node]
-
points
Returns Widget
alignment coordinates realative to the given Node
.
Parameters:
-
[node]
Node | String | Null optional<p><p><p>The node to align to, or null to indicate the viewport.</p></p></p>
-
points
Array<p><p><p>The alignment points.</p></p></p>
Returns:
<p><p><p>the coordinates.</p></p></p>
_getAlignToXY
-
'Node'
-
[point]
-
'Node'
-
'Node'
Returns coordinates realative to the passed Node
alignment.
Parameters:
Returns:
<p><p><p>the coordinates.</p></p></p>
_getAttr
-
name
Provides the common implementation for the public get method, allowing Attribute hosts to over-ride either method.
See <a href="#method_get">get</a> for argument details.
Parameters:
-
name
String<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The name of the attribute.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The value of the attribute.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_getAttrCfg
-
name
Returns an object with the configuration properties (and value) for the given attribute. If attrName is not provided, returns the configuration properties for all attributes.
Parameters:
-
name
String<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>Optional. The attribute name. If not provided, the method will return the configuration for all attributes.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The configuration properties for the given attribute, or all attributes.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_getAttrCfgs
()
Object
protected
Returns an aggregated set of attribute configurations, by traversing the class hierarchy.
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The hash of attribute configurations, aggregated across classes in the hierarchy This value is cached the first time the method, or _getClasses, is invoked. Subsequent invocations return the cached value.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_getAttrInitVal
-
attr
-
cfg
-
initValues
Returns the initial value of the given attribute from either the default configuration provided, or the over-ridden value if it exists in the set of initValues provided and the attribute is not read-only.
Parameters:
-
attr
String<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The name of the attribute</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
cfg
Object<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The attribute configuration object</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
initValues
Object<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The object with simple and complex attribute name/value pairs returned from _normAttrVals</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The initial value of the attribute.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_getAttrs
-
attrs
Implementation behind the public getAttrs method, to get multiple attribute values.
Parameters:
-
attrs
String | Boolean<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>Optional. An array of attribute names. If omitted, all attribute values are returned. If set to true, all attributes modified from their initial values are returned.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>An object with attribute name/value pairs.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_getClasses
()
Function
protected
Returns the class hierarchy for this object, with BaseCore being the last class in the array.
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>An array of classes (constructor functions), making up the class hierarchy for this object. This value is cached the first time the method, or _getAttrCfgs, is invoked. Subsequent invocations return the cached value.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_getFullType
-
type
Returns the fully qualified type, given a short type string. That is, returns "foo:bar" when given "bar" if "foo" is the configured prefix.
NOTE: This method, unlike _getType, does no checking of the value passed in, and is designed to be used with the low level _publish() method, for critical path implementations which need to fast-track publish for performance reasons.
Parameters:
-
type
String<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The short type to prefix</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The prefixed type, if a prefix is set, otherwise the type passed in</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_getHtmlParser
()
Object
private
Gets the HTML_PARSER definition for this instance, by merging HTML_PARSER definitions across the class hierarchy.
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p>HTML_PARSER definition for this instance</p></p></p></p></p></p></p></p></p></p></p></p>
_getInstanceAttrCfgs
-
allCfgs
A helper method used to isolate the attrs config for this instance to pass to addAttrs
,
from the static cached ATTRS for the class.
Parameters:
-
allCfgs
Object<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The set of all attribute configurations for this instance. Attributes will be removed from this set, if they belong to the filtered class, so that by the time all classes are processed, allCfgs will be empty.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The set of attributes to be added for this instance, suitable for passing through to <code>addAttrs</code>.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_getNodeToParse
()
Node
private
Determines whether we have a node reference which we should try and parse.
The current implementation does not parse nodes generated from CONTENT_TEMPLATE, only explicitly set srcNode, or contentBox attributes.
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p>The node reference to apply HTML_PARSER to.</p></p></p></p></p></p></p></p></p></p></p></p>
_getPreciseHeight
-
node
Helper method to obtain the precise height of the node provided, including padding and border. The height could be a sub-pixel value for certain browsers, such as Firefox 3.
Parameters:
-
node
Node<p><p><p>The node for which the precise height is required.</p></p></p>
Returns:
<p><p><p>The height of the Node including borders and padding, possibly a float.</p></p></p>
_getRegion
-
[node]
Returns the region of the passed-in Node
, or the viewport region if
calling with passing in a Node
.
Parameters:
-
[node]
Node optional<p><p><p>The node to get the region of.</p></p></p>
Returns:
<p><p><p>The node's region.</p></p></p>
_getSelectedOptions
()
NodeList
protected
Getter for the selected options.
Returns:
Selected options.
_getShimTemplate
()
Node
private
Creates a cloned shim node, using the SHIM_TEMPLATE html template, for use on a new instance.
Returns:
<p><p><p>node A new shim Node instance.</p></p></p>
_getSrcNode
()
Node
protected
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p>The Node to apply HTML_PARSER to</p></p></p></p></p></p></p></p></p></p></p></p>
_getStateVal
-
name
-
[cfg]
Gets the stored value for the attribute, from either the internal state object, or the state proxy if it exits
Parameters:
-
name
String<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The name of the attribute</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
[cfg]
Object optional<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>Optional config hash for the attribute. This is added for performance along the critical path, where the calling method has already obtained the config from state.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The stored value of the attribute</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_getStdModContent
-
section
Retrieves the child nodes (content) of a standard module section
Parameters:
-
section
String<p><p><p>The standard module section whose child nodes are to be retrieved. Either WidgetStdMod.HEADER, WidgetStdMod.BODY or WidgetStdMod.FOOTER.</p></p></p>
Returns:
<p><p><p>The child node collection of the standard module section.</p></p></p>
_getStdModTemplate
-
section
Gets a new Node reference for the given standard module section, by cloning the stored template node.
Parameters:
-
section
String<p><p><p>The section to create a new node for. Either WidgetStdMod.HEADER, WidgetStdMod.BODY or WidgetStdMod.FOOTER.</p></p></p>
Returns:
<p><p><p>The new Node instance for the section</p></p></p>
_getType
()
private
If the instance has a prefix attribute and the event type is not prefixed, the instance prefix is applied to the supplied type.
_getUIEventNode
()
protected
Returns the node on which to bind delegate listeners.
_getX
()
Number
protected
Default getter for the X attribute. The value is retrieved from the XY attribute, which is the sole store for the XY state.
Returns:
<p><p><p>The X page co-ordinate value</p></p></p>
_getY
()
Number
protected
Default getter for the Y attribute. The value is retrieved from the XY attribute, which is the sole store for the XY state.
Returns:
<p><p><p>The Y page co-ordinate value</p></p></p>
_guid
()
protected
_handleCancelEvent
()
protected
<p>Fires the <code>click</code> event.</p>
_handleEditEvent
()
protected
<p>Fires the <code>edit</code> event.</p>
_handleInitEditEvent
()
protected
<p>Fires the <code>initEdit</code> event when the <code>A.BaseCellEditor</code> is rendered.</p>
_handleInitToolbarEvent
()
protected
<p>Fires the <code>initToolbar</code> event when the <code>A.BaseCellEditor</code> is rendered and the toolbar is visible.</p>
_handleInitValidatorEvent
()
protected
<p>Fires the <code>initValidator</code> event when the <code>A.BaseCellEditor</code> is rendered.</p>
_handleSaveEvent
()
protected
<p>Fires the <code>save</code> event when the cell values are valid.</p>
_hasPotentialSubscribers
-
fullType
Parameters:
-
fullType
String<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The fully prefixed type name</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>Whether the event has potential subscribers or not</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_initAttrHost
-
attrs
-
values
-
lazy
Constructor logic for attributes. Initializes the host state, and sets up the inital attributes passed to the constructor.
Parameters:
-
attrs
Object<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The attributes to add during construction (passed through to <a href="#method_addAttrs">addAttrs</a>). These can also be defined on the constructor being augmented with Attribute by defining the ATTRS property on the constructor.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
values
Object<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The initial attribute values to apply (passed through to <a href="#method_addAttrs">addAttrs</a>). These are not merged/cloned. The caller is responsible for isolating user provided values if required.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
lazy
Boolean<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>Whether or not to add attributes lazily (passed through to <a href="#method_addAttrs">addAttrs</a>).</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_initAttribute
()
private
Initializes AttributeCore
_initAttrs
-
attrs
-
values
-
lazy
Utility method to set up initial attributes defined during construction, either through the constructor.ATTRS property, or explicitly passed in.
Parameters:
-
attrs
Object<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The attributes to add during construction (passed through to <a href="#method_addAttrs">addAttrs</a>). These can also be defined on the constructor being augmented with Attribute by defining the ATTRS property on the constructor.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
values
Object<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The initial attribute values to apply (passed through to <a href="#method_addAttrs">addAttrs</a>). These are not merged/cloned. The caller is responsible for isolating user provided values if required.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
lazy
Boolean<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>Whether or not to add attributes lazily (passed through to <a href="#method_addAttrs">addAttrs</a>).</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_initBase
-
config
Internal construction logic for BaseCore.
Parameters:
-
config
Object<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The constructor configuration object</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_initEvents
()
protected
<p><code>publish()</code> custom events during <code>initializer</code>.</p>
_initHierarchy
-
userVals
Initializes the class hierarchy for the instance, which includes initializing attributes for each class defined in the class's static <a href="#property_BaseCore.ATTRS">ATTRS</a> property and invoking the initializer method on the prototype of each class in the hierarchy.
Parameters:
-
userVals
Object<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>Object with configuration property name/value pairs</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_initHierarchyData
()
private
A helper method used by _getClasses and _getAttrCfgs, which determines both the array of classes and aggregate set of attribute configurations across the class hierarchy for the instance.
_initUIEvent
-
type
Sets up infrastructure required to fire a UI event.
Parameters:
-
type
String<p><p><p><p><p><p><p><p><p><p><p><p>String representing the name of the event</p></p></p></p></p></p></p></p></p></p></p></p>
Returns:
_insertStdModSection
-
contentBox
-
section
-
sectionNode
Helper method to insert the Node for the given section into the correct location in the contentBox.
_isLazyAttr
-
name
Checks whether or not the attribute is one which has been added lazily and still requires initialization.
Parameters:
-
name
String<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The name of the attribute</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>true if it's a lazily added attribute, false otherwise.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_isUIEvent
-
type
Determines if the specified event is a UI event.
Parameters:
-
type
String<p><p><p><p><p><p><p><p><p><p><p><p>String representing the name of the event</p></p></p></p></p></p></p></p></p></p></p></p>
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p>Event Returns the name of the UI Event, otherwise undefined.</p></p></p></p></p></p></p></p></p></p></p></p>
_mapInstance
-
The
Utility method used to add an entry to the boundingBox id to instance map.
This method can be used to populate the instance with lazily created boundingBox Node references.
Parameters:
-
The
String<p><p><p><p><p><p><p><p><p><p><p><p>boundingBox id</p></p></p></p></p></p></p></p></p></p></p></p>
_monitor
-
what
-
eventType
-
o
This is the entry point for the event monitoring system. You can monitor 'attach', 'detach', 'fire', and 'publish'. When configured, these events generate an event. click -> click_attach, click_detach, click_publish -- these can be subscribed to like other events to monitor the event system. Inividual published events can have monitoring turned on or off (publish can't be turned off before it it published) by setting the events 'monitor' config.
Parameters:
-
what
String<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>'attach', 'detach', 'fire', or 'publish'</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
eventType
String | CustomEvent<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The prefixed name of the event being monitored, or the CustomEvent object.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
o
Object<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>Information about the event interaction, such as fire() args, subscription category, publish config</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_normAttrVals
-
valueHash
Utility method to normalize attribute values. The base implementation simply merges the hash to protect the original.
Parameters:
-
valueHash
Object<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>An object with attribute name/value pairs</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>An object literal with 2 properties - "simple" and "complex", containing simple and complex attribute values respectively keyed by the top level attribute name, or null, if valueHash is falsey.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_onButtonMouseDown
-
event
<p>Called when the user mouses down on the button element in the combobox.</p>
Parameters:
-
event
EventFacade
_onDocFocus
-
evt
DOM focus event handler, used to sync the state of the Widget with the DOM
Parameters:
-
evt
EventFacade<p><p><p><p><p><p><p><p><p><p><p><p>The event facade for the DOM focus event</p></p></p></p></p></p></p></p></p></p></p></p>
_onDocMouseDown
-
evt
"mousedown" event handler for the owner document of the widget's bounding box.
Parameters:
-
evt
EventFacade<p><p><p><p><p><p><p><p><p><p><p><p>The event facade for the DOM focus event</p></p></p></p></p></p></p></p></p></p></p></p>
_onDocMouseDownExt
-
event
<p>Fires after the <code>visibleChange</code> event binding the mousedown event.</p>
Parameters:
-
event
EventFacade
_onEditEvent
-
event
Fires on edit
event, loading the editing UI.
Parameters:
-
event
EventFacade
_onEditKeyEvent
-
event
Listen to keydown
event on A.BaseOptionsCellEditor
to focus on
the next option.
Parameters:
-
event
EventFacade
_onEditLinkClickEvent
-
event
Updates the option state on the UI on event click
on the edit link.
Parameters:
-
event
EventFacade
_onEscKey
-
event
<p>Fires the <code>keydown</code> event listener for the esc key.</p>
Parameters:
-
event
EventFacade
_onInterval
()
protected
<p>Enables the query to be triggered based on detecting text input via intervals instead of via key events.</p>
_onSubmit
-
event
<p>Fires the <code>submit</code> event.</p>
Parameters:
-
event
EventFacade
_onTextboxBlur
-
event
<p>Handles the input element losing focus.</p>
Parameters:
-
event
EventFacade
_onTextboxFocus
-
event
<p>Handles the input element gaining focus.</p>
Parameters:
-
event
EventFacade
_onTextboxKeyDown
-
event
<p>Handles the keydown events on the input element for functional keys.</p>
Parameters:
-
event
EventFacade
_onTextboxKeyPress
-
event
<p>Handles the key press events of the input element.</p>
Parameters:
-
event
EventFacade
_onTextboxKeyUp
-
event
<p>Handles the keyup events of the input element.</p>
Parameters:
-
event
EventFacade
_parseStdModHTML
-
section
Utility method, used by WidgetStdMods HTML_PARSER implementation to extract data for each section from markup.
Parameters:
-
section
String
Returns:
<p><p><p>Inner HTML string with the contents of the section</p></p></p>
_parseType
()
private
Returns an array with the detach key (if provided), and the prefixed event name from _getType Y.on('detachcategory| menu:click', fn)
_parseZIndex
-
srcNode
Parses a zIndex
attribute value from this widget's srcNode
.
Parameters:
-
srcNode
Node<p><p><p>The node to parse a <code>zIndex</code> value from.</p></p></p>
Returns:
<p><p><p>The parsed <code>zIndex</code> value.</p></p></p>
_preAddAttrs
-
attrs
-
userVals
-
lazy
Implement the BaseCore _preAddAttrs method hook, to add
the srcNode and related attributes, so that HTML_PARSER
(which relies on this.get("srcNode")
) can merge in it's
results before the rest of the attributes are added.
Parameters:
-
attrs
Object<p><p><p><p><p><p><p><p><p><p><p><p>The full hash of statically defined ATTRS attributes being added for this instance</p></p></p></p></p></p></p></p></p></p></p></p>
-
userVals
Object<p><p><p><p><p><p><p><p><p><p><p><p>The hash of user values passed to the constructor</p></p></p></p></p></p></p></p></p></p></p></p>
-
lazy
Boolean<p><p><p><p><p><p><p><p><p><p><p><p>Whether or not to add the attributes lazily</p></p></p></p></p></p></p></p></p></p></p></p>
_preInitEventCfg
-
config
Handles the special on, after and target properties which allow the user to easily configure on and after listeners as well as bubble targets during construction, prior to init.
Parameters:
-
config
Object<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The user configuration object</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_preventOverlap
-
val
-
axis
-
nodeRegion
-
constrainingRegion
The method which performs the preventOverlap calculations for a given axis ("x" or "y") based on the value and regions provided.
Parameters:
-
val
Number<p><p><p>The value being constrain</p></p></p>
-
axis
String<p><p><p>The axis to being constrained</p></p></p>
-
nodeRegion
Region<p><p><p>The region of the node being constrained</p></p></p>
-
constrainingRegion
Region<p><p><p>The region of the node (or viewport) we need to constrain to</p></p></p>
Returns:
<p><p><p>The constrained value</p></p></p>
_protectAttrs
-
attrs
Utility method to protect an attribute configuration hash, by merging the entire object and the individual attr config objects.
Parameters:
-
attrs
Object<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>A hash of attribute to configuration object pairs.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>A protected version of the attrs argument.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_publish
-
fullType
-
etOpts
-
ceOpts
The low level event publish implementation. It expects all the massaging to have been done
outside of this method. e.g. the type
to fullType
conversion. It's designed to be a fast
path publish, which can be used by critical code paths to improve performance.
Parameters:
-
fullType
String<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The prefixed type of the event to publish.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
etOpts
Object<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The EventTarget specific configuration to mix into the published event.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
ceOpts
Object<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The publish specific configuration to mix into the published event.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The published event. If called without <code>etOpts</code> or <code>ceOpts</code>, this will be the default <code>CustomEvent</code> instance, and can be configured independently.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_removeLoadingClassNames
()
protected
Removes class names representative of the widget's loading state from the boundingBox.
_renderBox
-
parentNode
Helper method to collect the boundingBox and contentBox and append to the provided parentNode, if not already a child. The owner document of the boundingBox, or the owner document of the contentBox will be used as the document into which the Widget is rendered if a parentNode is node is not provided. If both the boundingBox and the contentBox are not currently in the document, and no parentNode is provided, the widget will be rendered to the current document's body.
Parameters:
-
parentNode
Node<p><p><p><p><p><p><p><p><p><p><p><p>The parentNode to render the widget to. If not provided, and both the boundingBox and the contentBox are not currently in the document, the widget will be rendered to the current document's body.</p></p></p></p></p></p></p></p></p></p></p></p>
_renderBoxClassNames
()
protected
Applies standard class names to the boundingBox and contentBox
_renderInput
()
protected
<p>Handles the rendering of the input element.</p>
_renderShim
()
private
Creates the shim element and adds it to the DOM
_renderShimDeferred
()
private
Sets up change handlers for the visible attribute, to defer shim creation/rendering until the Widget is made visible.
_renderStdMod
-
section
Creates the DOM node for the given section, and inserts it into the correct location in the contentBox.
Parameters:
-
section
String<p><p><p>The section to create/render. Either WidgetStdMod.HEADER, WidgetStdMod.BODY or WidgetStdMod.FOOTER.</p></p></p>
Returns:
<p><p><p>A reference to the added section node</p></p></p>
_renderUI
()
protected
Initializes the UI state for the Widget's bounding/content boxes.
_renderUIInputTextControl
()
protected
<p>Create the DOM structure for the InputTextControl. Lifecycle.</p>
_renderUIPosition
()
protected
Creates/Initializes the DOM to support xy page positioning. <p> This method in invoked after renderUI is invoked for the Widget class using YUI's aop infrastructure. </p>
_renderUIStack
()
protected
Creates/Initializes the DOM to support stackability. <p> This method in invoked after renderUI is invoked for the Widget class using YUI's aop infrastructure. </p>
_renderUIStdMod
()
protected
Creates/Initializes the DOM for standard module support. <p> This method is invoked after renderUI is invoked for the Widget class using YUI's aop infrastructure. </p>
_sendQuery
-
query
<p>Makes a query request to the data source.</p>
Parameters:
-
query
String<p>The query string</p>
_set
-
name
-
val
-
[opts]
Allows setting of readOnly/writeOnce attributes. See <a href="#method_set">set</a> for argument details.
Parameters:
-
name
String<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The name of the attribute.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
val
Any<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The value to set the attribute to.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
[opts]
Object optional<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>Optional data providing the circumstances for the change.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>A reference to the host object.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_setAlignCenter
-
val
Default setter for center
Attribute changes. Sets up the appropriate
value, and passes it through the to the align attribute.
Parameters:
-
val
Boolean | Node<p><p><p>The Attribute value being set.</p></p></p>
Returns:
<p><p><p>the value passed in.</p></p></p>
_setAttr
-
name
-
value
-
[opts]
-
force
Provides the common implementation for the public set and protected _set methods.
See <a href="#method_set">set</a> for argument details.
Parameters:
-
name
String<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The name of the attribute.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
value
Any<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The value to set the attribute to.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
[opts]
Object optional<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>Optional data providing the circumstances for the change.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
force
Boolean<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>If true, allows the caller to set values for readOnly or writeOnce attributes which have already been set.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>A reference to the host object.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_setAttrs
-
attrs
-
[opts]
Implementation behind the public setAttrs method, to set multiple attribute values.
Parameters:
-
attrs
Object<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>An object with attributes name/value pairs.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
[opts]
Object optional<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>Optional data providing the circumstances for the change</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>A reference to the host object.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_setAttrVal
-
attrName
-
subAttrName
-
prevVal
-
newVal
-
[opts]
-
[attrCfg]
Updates the stored value of the attribute in the privately held State object, if validation and setter passes.
Parameters:
-
attrName
String<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The attribute name.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
subAttrName
String<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The sub-attribute name, if setting a sub-attribute property ("x.y.z").</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
prevVal
Any<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The currently stored value of the attribute.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
newVal
Any<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The value which is going to be stored.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
[opts]
Object optional<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>Optional data providing the circumstances for the change.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
[attrCfg]
Object optional<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>Optional config hash for the attribute. This is added for performance along the critical path, where the calling method has already obtained the config from state.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>true if the new attribute value was stored, false if not.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_setBB
-
node
Setter for the boundingBox attribute
Parameters:
-
node
Node | String
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p>Node</p></p></p></p></p></p></p></p></p></p></p></p>
_setBox
-
id
-
node
-
template
-
isBounding
Helper method to set the bounding/content box, or create it from the provided template if not found.
Parameters:
-
id
String<p><p><p><p><p><p><p><p><p><p><p><p>The node's id attribute</p></p></p></p></p></p></p></p></p></p></p></p>
-
node
Node | String<p><p><p><p><p><p><p><p><p><p><p><p>The node reference</p></p></p></p></p></p></p></p></p></p></p></p>
-
template
String<p><p><p><p><p><p><p><p><p><p><p><p>HTML string template for the node</p></p></p></p></p></p></p></p></p></p></p></p>
-
isBounding
Boolean<p><p><p><p><p><p><p><p><p><p><p><p>true if this is the boundingBox, false if it's the contentBox</p></p></p></p></p></p></p></p></p></p></p></p>
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p>The node</p></p></p></p></p></p></p></p></p></p></p></p>
_setCB
-
node
Setter for the contentBox attribute
Parameters:
-
node
Node | String
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p>Node</p></p></p></p></p></p></p></p></p></p></p></p>
_setConstrain
-
val
The setter implementation for the "constrain" attribute.
Parameters:
-
val
Node | boolean<p><p><p>The attribute value</p></p></p>
_setOptions
-
val
Determines the proper format for the options
attribute.
Parameters:
-
val
Array
_setStateVal
-
name
-
value
Sets the stored value for the attribute, in either the internal state object, or the state proxy if it exits
Parameters:
-
name
String<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The name of the attribute</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
value
Any<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The value of the attribute</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_setToolbar
-
val
<p>Setter for Toolbar attribute.</p>
Parameters:
-
val
Object
_setValidator
-
val
<p>Setter for Validator attribute.</p>
Parameters:
-
val
Object
_setX
-
val
Default setter for the X attribute. The setter passes the X value through to the XY attribute, which is the sole store for the XY state.
Parameters:
-
val
Number<p><p><p>The X page co-ordinate value</p></p></p>
_setY
-
val
Default setter for the Y attribute. The setter passes the Y value through to the XY attribute, which is the sole store for the XY state.
Parameters:
-
val
Number<p><p><p>The Y page co-ordinate value</p></p></p>
_setZIndex
-
zIndex
Default setter for zIndex attribute changes. Normalizes zIndex values to numbers, converting non-numerical values to 0.
Parameters:
-
zIndex
String | Number
Returns:
<p><p><p>Normalized zIndex</p></p></p>
_simulateDrag
-
test
-
dragHandle
-
dropNode
-
above
<p>Simulates dragging an option on top of another.</p>
_simulateInputChange
-
input
-
text
-
callback
<p>Simulates a <code>valuechange</code> event for the given input.</p>
Parameters:
-
input
Node<p>The input node to simulate the event for.</p>
-
text
String<p>The text that should be set as the input's final value.</p>
-
callback
Function<p>The function to be called when the simulation is done.</p>
_strSetter
-
strings
The default setter for the strings attribute. Merges partial sets into the full string set, to allow users to partial sets of strings
Parameters:
-
strings
Object
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p>The full set of strings to set</p></p></p></p></p></p></p></p></p></p></p></p>
_syncAttrUI
-
attrs
Invokes the _uiSet=ATTR NAME> method for the list of attributes provided
Parameters:
-
attrs
Array
_syncEditOptionsUI
()
protected
Sync edit options UI.
_syncElementsFocus
()
protected
<p>Syncs the element focus.</p>
_syncElementsName
()
protected
<p>Syncs the name attribute of form input.</p>
_syncFocus
()
protected
<p>Syncs the cell editor focus.</p>
_syncUI
()
protected
Updates the widget UI to reflect the attribute state.
_syncUIChild
()
protected
Synchronizes the UI to match the WidgetChild state. <p> This method is invoked after bindUI is invoked for the Widget class using YUI's aop infrastructure. </p>
_syncUIPosAlign
()
protected
Synchronizes the current align
Attribute value to the DOM.
This method is invoked after syncUI
has been invoked for the Widget
class using the AOP infrastructure.
_syncUIPosition
()
protected
Synchronizes the UI to match the Widgets xy page position state. <p> This method in invoked after syncUI is invoked for the Widget class using YUI's aop infrastructure. </p>
_syncUIStack
()
protected
Synchronizes the UI to match the Widgets stack state. This method in invoked after syncUI is invoked for the Widget class using YUI's aop infrastructure.
_syncUIStdMod
()
protected
Synchronizes the UI to match the Widgets standard module state. <p> This method is invoked after syncUI is invoked for the Widget class using YUI's aop infrastructure. </p>
_typeAhead
-
elListItem
-
query
<p>Updates in the input element with the first result as the user types, selecting the text the user has not typed yet.</p>
Parameters:
-
elListItem
Node<p>The selected list item</p>
-
query
String<p>The query string</p>
_uiSetAlign
-
[node]
-
points
Updates the UI to reflect the align
value passed in.
Note: See the align
Attribute documentation, for the Object structure
expected.
Parameters:
-
[node]
Node | String | Null optional<p><p><p>The node to align to, or null to indicate the viewport.</p></p></p>
-
points
Array<p><p><p>The alignment points.</p></p></p>
_uiSetChildSelected
-
selected
Updates the UI to reflect the <code>selected</code> attribute value.
Parameters:
-
selected
Number<p><p><p><p><p><p><p><p><p><p><p><p>The selected value to be reflected in the UI.</p></p></p></p></p></p></p></p></p></p></p></p>
_uiSetDim
-
dim
-
val
Parameters:
-
dim
String<p><p><p><p><p><p><p><p><p><p><p><p>The dimension - "width" or "height"</p></p></p></p></p></p></p></p></p></p></p></p>
-
val
Number | String<p><p><p><p><p><p><p><p><p><p><p><p>The value to set</p></p></p></p></p></p></p></p></p></p></p></p>
_uiSetDisabled
-
val
Sets the disabled state for the UI
Parameters:
-
val
Boolean
_uiSetEditable
-
val
<p>Syncs the name attribute of form input.</p>
Parameters:
-
val
Object
_uiSetFillHeight
-
fillSection
Updates the rendered UI, to resize the provided section so that the standard module fills out the specified widget height. Note: This method does not check whether or not a height is set on the Widget.
Parameters:
-
fillSection
String<p><p><p>A valid section specifier - one of WidgetStdMod.HEADER, WidgetStdMod.BODY or WidgetStdMod.FOOTER</p></p></p>
_uiSetFocused
-
val
-
src
Sets the focused state for the UI
Parameters:
-
val
Boolean -
src
String<p><p><p><p><p><p><p><p><p><p><p><p>String representing the source that triggered an update to the UI.</p></p></p></p></p></p></p></p></p></p></p></p>
_uiSetHeight
-
val
Sets the height on the widget's bounding box element
Parameters:
-
val
String | Number
_uiSetOptions
-
val
Set UI Options values.
Parameters:
-
val
Array
_uiSetShim
-
enable
Updates the UI to enable/disable the shim. If the widget is not currently visible, creation of the shim is deferred until it is made visible, for performance reasons.
Parameters:
-
enable
Boolean<p><p><p>If true, creates/renders the shim, if false, removes it.</p></p></p>
_uiSetShowToolbar
-
val
<p>Setter for ShowToolbar attribute.</p>
Parameters:
-
val
Object
_uiSetStdMod
-
section
-
content
-
where
Updates the rendered UI, adding the provided content (either an HTML string, or node reference), to the specified section. The content is either added before, after or replaces existing content in the section, based on the value of the <code>where</code> argument.
Parameters:
-
section
String<p><p><p>The section to be updated. Either WidgetStdMod.HEADER, WidgetStdMod.BODY or WidgetStdMod.FOOTER.</p></p></p>
-
content
String | Node<p><p><p>The new content (either as an HTML string, or Node reference) to add to the section</p></p></p>
-
where
String<p><p><p>Optional. Either WidgetStdMod.AFTER, WidgetStdMod.BEFORE or WidgetStdMod.REPLACE. If not provided, the content will replace existing content in the section.</p></p></p>
_uiSetTabIndex
-
Number
Set the tabIndex on the widget's rendered UI
Parameters:
-
Number
Object
_uiSetValue
-
val
Sets the selectedAttrName
(selected
) attribute on the option
elements matching val
.
Parameters:
-
val
Array | String
Returns:
Resulting new values.
_uiSetVisible
-
val
Sets the visible state for the UI
Parameters:
-
val
Boolean
_uiSetVisiblePosAlign
-
visible
Attaches or detaches alignment-syncing event handlers based on the widget's
visible
Attribute state.
Parameters:
-
visible
Boolean<p><p><p>The current value of the widget's <code>visible</code> Attribute.</p></p></p>
_uiSetWidth
-
val
Sets the width on the widget's bounding box element
Parameters:
-
val
String | Number
_uiSetXY
-
val
Updates the UI to reflect the XY page co-ordinates passed in.
Parameters:
-
val
String<p><p><p>The XY page co-ordinates value to be reflected in the UI</p></p></p>
_uiSetZIndex
-
zIndex
Updates the UI to reflect the zIndex value passed in.
Parameters:
-
zIndex
Number<p><p><p>The zindex to be reflected in the UI</p></p></p>
_uiSizeCB
-
expand
Parameters:
-
expand
Boolean
_unbindDOM
()
protected
_unbindUI
()
protected
_validateFillHeight
-
val
Default validator for the fillHeight attribute. Verifies that the value set is a valid section specifier - one of WidgetStdMod.HEADER, WidgetStdMod.BODY or WidgetStdMod.FOOTER, or a falsey value if fillHeight is to be disabled.
Parameters:
-
val
String<p><p><p>The section which should be setup to fill height, or false/null to disable fillHeight</p></p></p>
Returns:
<p><p><p>true if valid, false if not</p></p></p>
_validateXY
-
val
Default validator for the XY attribute
Parameters:
-
val
Array<p><p><p>The XY page co-ordinate value which is being set.</p></p></p>
Returns:
<p><p><p>true if valid, false if not.</p></p></p>
addAttr
-
name
-
config
-
lazy
<p> Adds an attribute with the provided configuration to the host object. </p> <p> The config argument object supports the following properties: </p>
<dl> <dt>value <Any></dt> <dd>The initial value to set on the attribute</dd>
<dt>valueFn <Function | String></dt> <dd> <p>A function, which will return the initial value to set on the attribute. This is useful for cases where the attribute configuration is defined statically, but needs to reference the host instance ("this") to obtain an initial value. If both the value and valueFn properties are defined, the value returned by the valueFn has precedence over the value property, unless it returns undefined, in which case the value property is used.</p>
<p>valueFn can also be set to a string, representing the name of the instance method to be used to retrieve the value.</p> </dd>
<dt>readOnly <boolean></dt> <dd>Whether or not the attribute is read only. Attributes having readOnly set to true cannot be modified by invoking the set method.</dd>
<dt>writeOnce <boolean> or <string></dt> <dd> Whether or not the attribute is "write once". Attributes having writeOnce set to true, can only have their values set once, be it through the default configuration, constructor configuration arguments, or by invoking set. <p>The writeOnce attribute can also be set to the string "initOnly", in which case the attribute can only be set during initialization (when used with Base, this means it can only be set during construction)</p> </dd>
<dt>setter <Function | String></dt> <dd> <p>The setter function used to massage or normalize the value passed to the set method for the attribute. The value returned by the setter will be the final stored value. Returning <a href="#property_Attribute.INVALID_VALUE">Attribute.INVALID_VALUE</a>, from the setter will prevent the value from being stored. </p>
<p>setter can also be set to a string, representing the name of the instance method to be used as the setter function.</p> </dd>
<dt>getter <Function | String></dt> <dd> <p> The getter function used to massage or normalize the value returned by the get method for the attribute. The value returned by the getter function is the value which will be returned to the user when they invoke get. </p>
<p>getter can also be set to a string, representing the name of the instance method to be used as the getter function.</p> </dd>
<dt>validator <Function | String></dt> <dd> <p> The validator function invoked prior to setting the stored value. Returning false from the validator function will prevent the value from being stored. </p>
<p>validator can also be set to a string, representing the name of the instance method to be used as the validator function.</p> </dd>
<dt>lazyAdd <boolean></dt> <dd>Whether or not to delay initialization of the attribute until the first call to get/set it. This flag can be used to over-ride lazy initialization on a per attribute basis, when adding multiple attributes through the <a href="#method_addAttrs">addAttrs</a> method.</dd>
</dl>
<p>The setter, getter and validator are invoked with the value and name passed in as the first and second arguments, and with the context ("this") set to the host object.</p>
<p>Configuration properties outside of the list mentioned above are considered private properties used internally by attribute, and are not intended for public use.</p>
Parameters:
-
name
String<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The name of the attribute.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
config
Object<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>An object with attribute configuration property/value pairs, specifying the configuration for the attribute.</p> <p><p> <strong>NOTE:</strong> The configuration object is modified when adding an attribute, so if you need to protect the original values, you will need to merge the object. </p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
lazy
Boolean<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>(optional) Whether or not to add this attribute lazily (on the first call to get/set).</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>A reference to the host object.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
addAttrs
-
cfgs
-
values
-
lazy
Configures a group of attributes, and sets initial values.
<p> <strong>NOTE:</strong> This method does not isolate the configuration object by merging/cloning. The caller is responsible for merging/cloning the configuration object if required. </p>
Parameters:
-
cfgs
Object<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>An object with attribute name/configuration pairs.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
values
Object<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>An object with attribute name/value pairs, defining the initial values to apply. Values defined in the cfgs argument will be over-written by values in this argument unless defined as read only.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
lazy
Boolean<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>Whether or not to delay the intialization of these attributes until the first call to get/set. Individual attributes can over-ride this behavior by defining a lazyAdd configuration property in their configuration. See <a href="#method_addAttr">addAttr</a>.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>A reference to the host object.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
addNewOption
-
name
-
value
Adds a new option to the A.BaseOptionsCellEditor
.
If name
or value
is omitted, a blank string is used in it's
place.
Parameters:
-
name
Object -
value
Object
addTarget
-
o
Registers another EventTarget as a bubble target. Bubble order is determined by the order registered. Multiple targets can be specified.
Events can only bubble if emitFacade is true.
Included in the event-custom-complex submodule.
Parameters:
-
o
EventTarget<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>the target to add</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
after
-
type
-
fn
-
[context]
-
[arg*]
Subscribe to a custom event hosted by this object. The supplied callback will execute after any listeners add via the subscribe method, and after the default function, if configured for the event, has executed.
Parameters:
-
type
String<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The name of the event</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
fn
Function<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The callback to execute in response to the event</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
[context]
Object optional<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>Override <code>this</code> object in callback</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
[arg*]
Any optional<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>0..n additional arguments to supply to the subscriber</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>A subscription handle capable of detaching the subscription</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
align
-
[node]
-
[points]
Aligns this widget to the provided Node
(or viewport) using the provided
points. This method can be invoked with no arguments which will cause the
widget's current align
Attribute value to be synced to the DOM.
Parameters:
-
[node]
Node | String | Null optional<p><p><p>A reference (or selector String) for the <code>Node</code> which with the widget is to be aligned. If null is passed in, the widget will be aligned with the viewport.</p></p></p>
-
[points]
Array2 optional<p><p><p>A two item array specifying the points on the widget and <code>Node</code>/viewport which will to be aligned. The first entry is the point on the widget, and the second entry is the point on the <code>Node</code>/viewport. Valid point references are defined as static constants on the <code>WidgetPositionAlign</code> extension.</p></p></p>
Example:
Aligning to the top-left corner of the <body>
:
myWidget.align('body',
[Y.WidgetPositionAlign.TL, Y.WidgetPositionAlign.TR]);
ancestor
-
depth
Returns the Widget instance at the specified depth.
Parameters:
-
depth
Number<p><p><p><p><p><p><p><p><p><p><p><p>Number representing the depth of the ancestor.</p></p></p></p></p></p></p></p></p></p></p></p>
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p>Widget instance.</p></p></p></p></p></p></p></p></p></p></p></p>
attrAdded
-
name
Checks if the given attribute has been added to the host
Parameters:
-
name
String<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The name of the attribute to check.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>true if an attribute with the given name has been added, false if it hasn't. This method will return true for lazily added attributes.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
before
()
Executes the callback before a DOM event, custom event or method. If the first argument is a function, it is assumed the target is a method. For DOM and custom events, this is an alias for Y.on.
For DOM and custom events: type, callback, context, 0-n arguments
For methods: callback, object (method host), methodName, context, 0-n arguments
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>detach handle</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
bindUI
()
protected
Configures/Sets up listeners to bind Widget State to UI/DOM
This method is not called by framework and is not chained automatically for the class hierarchy.
blur
()
chainable
Causes the Widget to lose focus by setting the "focused" attribute to "false"
bubble
-
evt
Propagate an event. Requires the event-custom-complex module.
Parameters:
-
evt
CustomEvent<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>the custom event to propagate</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>the aggregated return value from Event.Custom.fire</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
centered
-
[node]
Centers the widget in the viewport, or if a Node
is passed in, it will
be centered to that Node
.
Parameters:
-
[node]
Node | String optional<p><p><p>A <code>Node</code> reference or selector String defining the <code>Node</code> which the widget should be centered. If a <code>Node</code> is not passed in, then the widget will be centered to the viewport.</p></p></p>
constrain
-
xy
-
node
Constrains the widget's bounding box to a node (or the viewport). If xy or node are not passed in, the current position and the value of "constrain" will be used respectively.
The widget's position will be changed to the constrained position.
Parameters:
-
xy
Array<p><p><p>Optional. The xy values to constrain</p></p></p>
-
node
Node | boolean<p><p><p>Optional. The node to constrain to, or true for the viewport</p></p></p>
destroy
-
destroyAllNodes
<p> Destroy lifecycle method. Fires the destroy event, prior to invoking destructors for the class hierarchy.
Overrides Base's implementation, to support arguments to destroy </p> <p> Subscribers to the destroy event can invoke preventDefault on the event object, to prevent destruction from proceeding. </p>
Parameters:
-
destroyAllNodes
Boolean<p><p><p><p><p><p><p><p><p><p><p><p>If true, all nodes contained within the Widget are removed and destroyed. Defaults to false due to potentially high run-time cost.</p></p></p></p></p></p></p></p></p></p></p></p>
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p>A reference to this object</p></p></p></p></p></p></p></p></p></p></p></p>
destructor
()
protected
<p>Destructor lifecycle implementation for the <code>A.BaseCellEditor</code> class.</p>
detach
-
type
-
fn
-
context
Detach one or more listeners the from the specified event
Parameters:
-
type
String | Object<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>Either the handle to the subscriber or the type of event. If the type is not specified, it will attempt to remove the listener from all hosted events.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
fn
Function<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The subscribed function to unsubscribe, if not supplied, all subscribers will be removed.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
context
Object<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The custom object passed to subscribe. This is optional, but if supplied will be used to disambiguate multiple listeners that are the same (e.g., you subscribe many object using a function that lives on the prototype)</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>the host</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
detachAll
-
type
Removes all listeners from the specified event. If the event type is not specified, all listeners from all hosted custom events will be removed.
Parameters:
-
type
String<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The type, or name of the event</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
disable
()
chainable
Set the Widget's "disabled" attribute to "true".
doBeforeLoadData
-
event
<p>An overridable method that is executed before the result overlay is loaded with results.</p>
Parameters:
-
event
EventFacade
Returns:
enable
()
chainable
Set the Widget's "disabled" attribute to "false".
fillHeight
-
node
Sets the height on the provided header, body or footer element to fill out the height of the Widget. It determines the height of the widgets bounding box, based on it's configured height value, and sets the height of the provided section to fill out any space remaining after the other standard module section heights have been accounted for.
<p><strong>NOTE:</strong> This method is not designed to work if an explicit height has not been set on the Widget, since for an "auto" height Widget, the heights of the header/body/footer will drive the height of the Widget.</p>
Parameters:
-
node
Node<p><p><p>The node which should be resized to fill out the height of the Widget bounding box. Should be a standard module section node which belongs to the widget.</p></p></p>
fire
-
type
-
arguments
Fire a custom event by name. The callback functions will be executed from the context specified when the event was created, and with the following parameters.
The first argument is the event type, and any additional arguments are passed to the listeners as parameters. If the first of these is an object literal, and the event is configured to emit an event facade, that object is mixed into the event facade and the facade is provided in place of the original object.
If the custom event object hasn't been created, then the event hasn't been published and it has no subscribers. For performance sake, we immediate exit in this case. This means the event won't bubble, so if the intention is that a bubble target be notified, the event must be published on this object first.
Parameters:
-
type
String | Object<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The type of the event, or an object that contains a 'type' property.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
arguments
Object<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>an arbitrary set of parameters to pass to the handler. If the first of these is an object literal and the event is configured to emit an event facade, the event facade will replace that parameter after the properties the object literal contains are copied to the event facade.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>True if the whole lifecycle of the event went through, false if at any point the event propagation was halted.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
focus
()
chainable
Causes the Widget to receive the focus by setting the "focused" attribute to "true".
formatResult
-
result
-
request
-
resultMatch
<p>An overridable method for formatting the result of the query before it's displayed in the overlay.</p>
Parameters:
-
result
Object<p>The result data object</p>
-
request
String<p>The current query string</p>
-
resultMatch
String<p>The string from the results that matches the query</p>
Returns:
formatValue
-
inputFormatter
-
val
<p>Utility method, which calls the passed <code>inputFormatter</code> Function, using <code>val</code> as an argument.</p>
Parameters:
-
inputFormatter
Function<p>See <code>inputFormatter</code> attribute.</p>
-
val
Mixed
Returns:
<p>Formated Value.</p>
generateRequest
-
query
<p>An overridable method that creates an object to be passed to the sendRequest method of the data source object. Useful to overwrite if you wish to create a custom request object before it's sent.</p>
Parameters:
-
query
String<p>The string currently being entered</p>
Returns:
get
-
name
Returns the current value of the attribute. If the attribute has been configured with a 'getter' function, this method will delegate to the 'getter' to obtain the value of the attribute.
Parameters:
-
name
String<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The name of the attribute. If the value of the attribute is an Object, dot notation can be used to obtain the value of a property of the object (e.g. <code>get("x.y.z")</code>)</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The value of the attribute</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
getAttrs
-
attrs
Gets multiple attribute values.
Parameters:
-
attrs
String | Boolean<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>Optional. An array of attribute names. If omitted, all attribute values are returned. If set to true, all attributes modified from their initial values are returned.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>An object with attribute name/value pairs.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
getClassName
-
args
Generate a standard prefixed classname for the Widget, prefixed by the default prefix defined by the <code>Y.config.classNamePrefix</code> attribute used by <code>ClassNameManager</code> and <code>Widget.NAME.toLowerCase()</code> (e.g. "yui-widget-xxxxx-yyyyy", based on default values for the prefix and widget class name). <p> The instance based version of this method can be used to generate standard prefixed classnames, based on the instances NAME, as opposed to Widget.NAME. This method should be used when you need to use a constant class name across different types instances. </p>
Parameters:
-
args
String multiple<p><p><p><p><p><p><p><p><p><p><p><p>0..n strings which should be concatenated, using the default separator defined by ClassNameManager, to create the class name</p></p></p></p></p></p></p></p></p></p></p></p>
getConstrainedXY
-
xy
-
node
Calculates the constrained positions for the XY positions provided, using the provided node argument is passed in. If no node value is passed in, the value of the "constrain" attribute is used.
Parameters:
-
xy
Array<p><p><p>The xy values to constrain</p></p></p>
-
node
Node | boolean<p><p><p>Optional. The node to constrain to, or true for the viewport</p></p></p>
Returns:
<p><p><p>The constrained xy values</p></p></p>
getElementsValue
()
String
<p>Gets the <code>A.BaseCellEditor</code> input value.</p> <p>NOTE FOR DEVELOPERS: Yoy <em>may</em> want to replace the methods from this section on your implementation.</p>
Returns:
<p>Input value.</p>
getEvent
-
type
-
prefixed
Returns the custom event of the provided type has been created, a falsy value otherwise
Parameters:
-
type
String<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>the type, or name of the event</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
prefixed
String<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>if true, the type is prefixed already</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>the custom event or null</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
getSkinName
-
[skinPrefix]
Returns the name of the skin that's currently applied to the widget.
Searches up the Widget's ancestor axis for, by default, a class yui3-skin-(name), and returns the (name) portion. Otherwise, returns null.
This is only really useful after the widget's DOM structure is in the document, either by render or by progressive enhancement.
Parameters:
-
[skinPrefix]
String optional<p><p><p><p><p><p><p><p><p><p><p><p>The prefix which the implementation uses for the skin ("yui3-skin-" is the default).</p> <p>NOTE: skinPrefix will be used as part of a regular expression:</p> <pre><code>new RegExp('\b' + skinPrefix + '(\S+)') </code></pre> <p>Although an unlikely use case, literal characters which may result in an invalid regular expression should be escaped.</p></p></p></p></p></p></p></p></p></p></p></p>
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p>The name of the skin, or null, if a matching skin class is not found.</p></p></p></p></p></p></p></p></p></p></p></p>
getStdModNode
-
section
-
forceCreate
Returns the node reference for the specified section
.
Note: The DOM is not queried for the node reference. The reference
stored by the widget instance is returned if it was set. Passing a
truthy for forceCreate
will create the section node if it does not
already exist.
Parameters:
-
section
String<p><p><p>The section whose node reference is required. Either <code>WidgetStdMod.HEADER</code>, <code>WidgetStdMod.BODY</code>, or <code>WidgetStdMod.FOOTER</code>.</p></p></p>
-
forceCreate
Boolean<p><p><p>Whether the section node should be created if it does not already exist.</p></p></p>
Returns:
<p><p><p>The node reference for the <code>section</code>, or null if not set.</p></p></p>
getString
-
key
Helper method to get a specific string value
Parameters:
-
key
String
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p>The string</p></p></p></p></p></p></p></p></p></p></p></p>
getStrings
-
key
Helper method to get the complete set of strings for the widget
Parameters:
-
key
String
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p>The strings</p></p></p></p></p></p></p></p></p></p></p></p>
getTargets
()
Returns an array of bubble targets for this object.
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>EventTarget[]</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
getValue
()
Mixed
<p>Gets and formats the <code>A.BaseCellEditor</code> input value.</p>
Returns:
<p>Formated Value.</p>
handleResponse
-
event
<p>Handles the response for the display of the results. This is a callback method that is fired by the sendRequest method so that results are ready to be accessed.</p>
Parameters:
-
event
EventFacade
hide
()
chainable
Hides the Widget by setting the "visible" attribute to "false".
init
-
cfg
Init lifecycle method, invoked during construction. Sets up attributes and invokes initializers for the class hierarchy.
Parameters:
-
cfg
Object<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>Object with configuration property name/value pairs</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>A reference to this object</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
initializer
()
protected
Construction logic executed during A.BaseOptionsCellEditor
instantiation. Lifecycle.
isRoot
()
Boolean
Determines if the Widget is the root Widget in the object hierarchy.
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p>Boolean indicating if Widget is the root Widget in the object hierarchy.</p></p></p></p></p></p></p></p></p></p></p></p>
modifyAttr
-
name
-
config
Updates the configuration of an attribute which has already been added. <p> The properties which can be modified through this interface are limited to the following subset of attributes, which can be safely modified after a value has already been set on the attribute: </p> <dl> <dt>readOnly;</dt> <dt>writeOnce;</dt> <dt>broadcast; and</dt> <dt>getter.</dt> </dl> <p> Note: New attributes cannot be added using this interface. New attributes must be added using addAttr, or an appropriate manner for a class which utilises Attributes (e.g. the ATTRS property in Base). </p>
Parameters:
-
name
String<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The name of the attribute whose configuration is to be updated.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
config
Object<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>An object with configuration property/value pairs, specifying the configuration properties to modify.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
move
-
x
-
[y]
Moves the Widget to the specified page xy co-ordinate position.
next
-
circular
Returns the Widget's next sibling.
Parameters:
-
circular
Boolean<p><p><p><p><p><p><p><p><p><p><p><p>Boolean indicating if the parent's first child should be returned if the child has no next sibling.</p></p></p></p></p></p></p></p></p></p></p></p>
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p>Widget instance.</p></p></p></p></p></p></p></p></p></p></p></p>
on
-
type
-
fn
-
[context]
-
[arg*]
Subscribe a callback function to a custom event fired by this object or from an object that bubbles its events to this object.
this.on("change", this._onChange, this);
Callback functions for events published with emitFacade = true
will
receive an EventFacade
as the first argument (typically named "e").
These callbacks can then call e.preventDefault()
to disable the
behavior published to that event's defaultFn
. See the EventFacade
API for all available properties and methods. Subscribers to
non-emitFacade
events will receive the arguments passed to fire()
after the event name.
To subscribe to multiple events at once, pass an object as the first argument, where the key:value pairs correspond to the eventName:callback.
this.on({
"attrChange" : this._onAttrChange,
"change" : this._onChange
});
You can also pass an array of event names as the first argument to subscribe to all listed events with the same callback.
this.on([ "change", "attrChange" ], this._onChange);
Returning false
from a callback is supported as an alternative to
calling e.preventDefault(); e.stopPropagation();
. However, it is
recommended to use the event methods whenever possible.
Parameters:
-
type
String<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The name of the event</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
fn
Function<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The callback to execute in response to the event</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
[context]
Object optional<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>Override <code>this</code> object in callback</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
[arg*]
Any optional<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>0..n additional arguments to supply to the subscriber</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>A subscription handle capable of detaching that subscription</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
once
-
type
-
fn
-
[context]
-
[arg*]
Listen to a custom event hosted by this object one time. This is the equivalent to <code>on</code> except the listener is immediatelly detached when it is executed.
Parameters:
-
type
String<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The name of the event</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
fn
Function<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The callback to execute in response to the event</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
[context]
Object optional<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>Override <code>this</code> object in callback</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
[arg*]
Any optional<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>0..n additional arguments to supply to the subscriber</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>A subscription handle capable of detaching the subscription</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
onceAfter
-
type
-
fn
-
[context]
-
[arg*]
Listen to a custom event hosted by this object one time. This is the equivalent to <code>after</code> except the listener is immediatelly detached when it is executed.
Parameters:
-
type
String<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The name of the event</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
fn
Function<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The callback to execute in response to the event</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
[context]
Object optional<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>Override <code>this</code> object in callback</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
[arg*]
Any optional<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>0..n additional arguments to supply to the subscriber</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>A subscription handle capable of detaching that subscription</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
parseType
-
type
-
[pre]
Takes the type parameter passed to 'on' and parses out the various pieces that could be included in the type. If the event type is passed without a prefix, it will be expanded to include the prefix one is supplied or the event target is configured with a default prefix.
Parameters:
-
type
String<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>the type</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
[pre]
String optional<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The prefix. Defaults to this._yuievt.config.prefix</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>an array containing:</p> <ul> <li>the detach category, if supplied,</li> <li>the prefixed event type,</li> <li>whether or not this is an after listener,</li> <li>the supplied event type</li> </ul></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
previous
-
circular
Returns the Widget's previous sibling.
Parameters:
-
circular
Boolean<p><p><p><p><p><p><p><p><p><p><p><p>Boolean indicating if the parent's last child should be returned if the child has no previous sibling.</p></p></p></p></p></p></p></p></p></p></p></p>
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p>Widget instance.</p></p></p></p></p></p></p></p></p></p></p></p>
publish
-
type
-
opts
Creates a new custom event of the specified type. If a custom event by that name already exists, it will not be re-created. In either case the custom event is returned.
Parameters:
-
type
String<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>the type, or name of the event</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
opts
Object<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>optional config params. Valid properties are:</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
[broadcast=false]
Boolean optional<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>whether or not the YUI instance and YUI global are notified when the event is fired.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
[bubbles=true]
Boolean optional<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>Whether or not this event bubbles. Events can only bubble if <code>emitFacade</code> is true.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
[context=this]
Object optional<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>the default execution context for the listeners.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
[defaultFn]
Function optional<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>the default function to execute when this event fires if preventDefault was not called.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
[emitFacade=false]
Boolean optional<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>whether or not this event emits a facade.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
[prefix]
String optional<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>the prefix for this targets events, e.g., 'menu' in 'menu:click'.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
[fireOnce=false]
Boolean optional<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>if an event is configured to fire once, new subscribers after the fire will be notified immediately.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
[async=false]
Boolean optional<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>fireOnce event listeners will fire synchronously if the event has already fired unless <code>async</code> is <code>true</code>.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
[preventable=true]
Boolean optional<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>whether or not <code>preventDefault()</code> has an effect.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
[preventedFn]
Function optional<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>a function that is executed when <code>preventDefault()</code> is called.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
[queuable=false]
Boolean optional<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>whether or not this event can be queued during bubbling.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
[silent]
Boolean optional<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>if silent is true, debug messages are not provided for this event.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
[stoppedFn]
Function optional<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>a function that is executed when stopPropagation is called.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
[monitored]
Boolean optional<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>specifies whether or not this event should send notifications about when the event has been attached, detached, or published.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
[type]
String optional<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>the event type (valid option if not provided as the first parameter to publish).</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>the custom event</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
removeAttr
-
name
Removes an attribute from the host object
Parameters:
-
name
String<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The name of the attribute to be removed.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
removeOption
-
optionRow
Removes the given optionRow
Node from A.BaseOptionsCellEditor
.
Parameters:
-
optionRow
Object
removeTarget
-
o
Removes a bubble target
Parameters:
-
o
EventTarget<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>the target to remove</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
render
-
parentNode
Establishes the initial DOM for the widget. Invoking this method will lead to the creating of all DOM elements for the widget (or the manipulation of existing DOM elements for the progressive enhancement use case). <p> This method should only be invoked once for an initialized widget. </p> <p> It delegates to the widget specific renderer method to do the actual work. </p>
Parameters:
-
parentNode
Object | String<p><p><p><p><p><p><p><p><p><p><p><p>Optional. The Node under which the Widget is to be rendered. This can be a Node instance or a CSS selector string. <p> If the selector string returns more than one Node, the first node will be used as the parentNode. NOTE: This argument is required if both the boundingBox and contentBox are not currently in the document. If it's not provided, the Widget will be rendered to the body of the current document in this case. </p></p></p></p></p></p></p></p></p></p></p></p></p>
renderer
()
protected
Creates DOM (or manipulates DOM for progressive enhancement) This method is invoked by render() and is not chained automatically for the class hierarchy (unlike initializer, destructor) so it should be chained manually for subclasses if required.
renderUI
()
protected
<p>Render the <code>A.BaseCellEditor</code> component instance. Lifecycle.</p>
reset
-
name
Resets the attribute (or all attributes) to its initial value, as long as the attribute is not readOnly, or writeOnce.
Parameters:
-
name
String<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>Optional. The name of the attribute to reset. If omitted, all attributes are reset.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>A reference to the host object.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
saveOptions
()
Saves the BaseOptionsCellEditor
options
property.
set
-
name
-
value
-
[opts]
Sets the value of an attribute.
Parameters:
-
name
String<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The name of the attribute. If the current value of the attribute is an Object, dot notation can be used to set the value of a property within the object (e.g. <code>set("x.y.z", 5)</code>).</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
value
Any<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The value to set the attribute to.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
[opts]
Object optional<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>Optional data providing the circumstances for the change.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>A reference to the host object.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
setAttrs
-
attrs
-
[opts]
Sets multiple attribute values.
Parameters:
-
attrs
Object<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>An object with attributes name/value pairs.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
[opts]
Object optional<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>Optional data providing the circumstances for the change.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>A reference to the host object.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
setStdModContent
-
section
-
content
-
where
Updates the body section of the standard module with the content provided (either an HTML string, or node reference). <p> This method can be used instead of the corresponding section content attribute if you'd like to retain the current content of the section, and insert content before or after it, by specifying the <code>where</code> argument. </p>
Parameters:
-
section
String<p><p><p>The standard module section whose content is to be updated. Either WidgetStdMod.HEADER, WidgetStdMod.BODY or WidgetStdMod.FOOTER.</p></p></p>
-
content
String | Node<p><p><p>The content to be added, either an HTML string or a Node reference.</p></p></p>
-
where
String<p><p><p>Optional. Either WidgetStdMod.AFTER, WidgetStdMod.BEFORE or WidgetStdMod.REPLACE. If not provided, the content will replace existing content in the section.</p></p></p>
show
()
chainable
Shows the Widget by setting the "visible" attribute to "true".
sizeShim
()
For IE6, synchronizes the size and position of iframe shim to that of Widget bounding box which it is protecting. For all other browsers, this method does not do anything.
subscribe
()
deprecated
subscribe to an event
syncUI
()
protected
<p>Sync the AutoComplete UI. Lifecycle.</p>
syncXY
()
Synchronizes the Panel's "xy", "x", and "y" properties with the Widget's position in the DOM.
toggleEdit
()
Toggles the display of the A.BaseOptionsCellEditor
.
toString
()
String
Generic toString implementation for all widgets.
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p>The default string value for the widget [ displays the NAME of the instance, and the unique id ]</p></p></p></p></p></p></p></p></p></p></p></p>
unsubscribe
()
deprecated
detach a listener
unsubscribeAll
-
type
Removes all listeners from the specified event. If the event type is not specified, all listeners from all hosted custom events will be removed.
Parameters:
-
type
String<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The type, or name of the event</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
Properties
_allowAdHocAttrs
Boolean
protected
This property controls whether or not instances of this class should allow users to add ad-hoc attributes through the constructor configuration hash.
AdHoc attributes are attributes which are not defined by the class, and are not handled by the MyClass._NON_ATTRS_CFG
Default: undefined (false)
_posAlignUIHandles
Array
protected
Holds the alignment-syncing event handles.
Default: null
_UI_ATTRS
Object
private
The lists of UI attributes to bind and sync for widget's _bindUI and _syncUI implementations
ATTRS
Object
static
Static property used to define the default attribute configuration
for the A.BaseOptionsCellEditor
.
BOUNDING_TEMPLATE
String
Property defining the markup template for bounding box.
CONTENT_TEMPLATE
String
Property defining the markup template for content box. If your Widget doesn't need the dual boundingBox/contentBox structure, set CONTENT_TEMPLATE to null, and contentBox and boundingBox will both point to the same Node.
DEF_PARENT_NODE
String | Node
Default node to render the bounding box to. If not set, will default to the current document body.
DEF_UNIT
String
Default unit to use for dimension values
EXTENDS
Object
static
Static property used to define which component it extends.
NAME
String
static
Static property provides a string to identify the class.
name
String
deprecated
The string used to identify the class of this object.
UI_ATTRS
Array
static
Static property used to define the UI attributes.
UI_EVENTS
Object
Map of DOM events that should be fired as Custom Events by the Widget instance.
Attributes
align
Object
The alignment configuration for this widget.
The align
attribute is used to align a reference point on the widget, with
the reference point on another Node
, or the viewport. The object which
align
expects has the following properties:
-
__
node
__: TheNode
to which the widget is to be aligned. If set tonull
, or not provided, the widget is aligned to the viewport. -
__
points
__: A two element Array, defining the two points on the widget andNode
/viewport which are to be aligned. The first element is the point on the widget, and the second element is the point on theNode
/viewport. Supported alignment points are defined as static properties onWidgetPositionAlign
.
Default: null
Example:
Aligns the top-right corner of the widget with the top-left corner of the viewport:
myWidget.set('align', {
points: [Y.WidgetPositionAlign.TR, Y.WidgetPositionAlign.TL]
});
alignOn
Array
An Array of Objects corresponding to the Node
s and events that will cause
the alignment of this widget to be synced to the DOM.
The alignOn
Attribute is expected to be an Array of Objects with the
following properties:
-
__
eventName
__: The String event name to listen for. -
__
node
__: The optionalNode
that will fire the event, it can be aNode
reference or a selector String. This will default to the widget'sboundingBox
.
Default: []
Example:
Sync this widget's alignment on window resize:
myWidget.set('alignOn', [
{
node : Y.one('win'),
eventName: 'resize'
}
]);
bodyContent
HTML
The content to be added to the body section. This will replace any existing content in the body. If you want to append, or insert new content, use the <a href="#method_setStdModContent">setStdModContent</a> method.
Default: undefined
boundingBox
String | Node
The outermost DOM node for the Widget, used for sizing and positioning of a Widget as well as a containing element for any decorator elements used for skinning.
centered
Boolean | Node
A convenience Attribute, which can be used as a shortcut for the align
Attribute.
If set to true
, the widget is centered in the viewport. If set to a Node
reference or valid selector String, the widget will be centered within the
Node
. If set to false
, no center positioning is applied.
Default: false
constrain
Boolean | Node
<p>The node to constrain the widget's bounding box to, when setting xy. Can also be set to true, to constrain to the viewport.</p>
Default: true
contentBox
String | Node
A DOM node that is a direct descendant of a Widget's bounding box that houses its content.
dataSource
Object | String | Function | Array
<p>The data source that results will be read from. This can either be an existing <a href="DataSource.html">DataSource</a> object, or it can be a value that would be passed to <a href="DataSource.html">DataSource</a>.</p>
Default: null
dataSourceType
String
<p>The type of the data source passed into <a href="AutoComplete.html#config_dataSource">dataSource</a>. This can be used to explicitly declare what kind of <a href="DataSource.html">DataSource</a> object will be created.</p>
Default: null
delimChar
String
<p>The character used to indicate the beginning or ending of a new value. Most commonly used is a ",".</p>
Default: null
destroyed
Boolean
readonly
Flag indicating whether or not this object has been through the destroy lifecycle phase.
Default: false
disabled
Boolean
Boolean indicating if the Widget should be disabled. The disabled implementation is left to the specific classes extending widget.
Default: false
editable
Boolean
<p>Indicates if <code>A.BaseCellEditor</code> is able to edit a cell's value.</p>
Default: false
elementName
String
<p>Defines the <code>name</code> of the <code>A.BaseCellEditor</code> input.</p>
Default: 'value'
fillHeight
String
The section (WidgetStdMod.HEADER, WidgetStdMod.BODY or WidgetStdMod.FOOTER) which should be resized to fill the height of the standard module, when a height is set on the Widget. If a height is not set on the widget, then all sections are sized based on their content.
Default: WidgetStdMod.BODY
focused
Boolean
readonly
Boolean indicating if the Widget, or one of its descendants, has focus.
Default: false
forceSelection
Boolean
<p>If <a href="AutoComplete.html#config_typeAhead">typeAhead</a> is true, this will clear a selection when the overlay closes unless a user explicitly selects an item.</p>
Default: false
headerContent
HTML
The content to be added to the header section. This will replace any existing content in the header. If you want to append, or insert new content, use the <a href="#method_setStdModContent">setStdModContent</a> method.
Default: undefined
height
String | Number
String with units, or number, representing the height of the Widget. If a number is provided, the default unit, defined by the Widgets DEF_UNIT, property is used.
Default: EMPTY_STR
hideEditContainerOnSave
Boolean
Indicates if the options Edit Container is hidden on the save
event.
Default: true
hideOnSave
Boolean
<p>Indicates if <code>A.BaseCellEditor</code> is hidden on the <code>save</code> event.</p>
Default: true
initialized
Boolean
readonly
Flag indicating whether or not this object has been through the init lifecycle phase.
Default: false
inputFormatter
Static property of input formatter for modifying the data values for showing on the UI.
Default null
Function will not modify the value.
Default: null
matchKey
String | Number
<p>The key or numeric index in the schema to match the result against.</p>
Default: 0
minQueryLength
Number
<p>The minimum number of characters required to query the data source.</p>
Default: 1
options
Object | Array
Array or Object which defines the available options for the
A.BaseOptionsCellEditor
.
Default: {}
optionsValidatorInputRules
Object
Defines the initial rules used to validate options.
Default: {custom: true, uniqueValue: true}
outputFormatter
Static property of output formatter for modifying the data values for output.
Default null
Function will not modify the value.
Default: null
preventOverlap
Boolean
If set to true, and WidgetPositionAlign is also added to the Widget, constrained positioning will attempt to prevent the widget's bounding box from overlapping the element to which it has been aligned, by flipping the orientation of the alignment for corner based alignments
queryDelay
Number
<p>The amount of time in seconds to delay before submitting the query.</p>
Default: 0.2
queryInterval
Number
<p>When IME usage is detected or interval detection is explicitly enabled, AutoComplete will detect the input value at the given interval and send a query if the value has changed.</p>
Default: 0.5
queryMatchCase
Boolean
<p>When <a href="AutoComplete.html#config_applyLocalFilter">applyLocalFilter</a> is true, setting this to true will match only results with the same case.</p>
Default: false
queryMatchContains
Boolean
<p>When <a href="AutoComplete.html#config_applyLocalFilter">applyLocalFilter</a> is true, setting this to true will match results which contain the query anywhere in the text, instead of just matching just items that start with the query.</p>
Default: false
queryQuestionMark
Boolean
<p>For IO DataSources, AutoComplete will automatically insert a "?" between the server URI and the encoded query string. To prevent this behavior, you can set this value to false. If you need to customize this even further, you can override the <a href="AutoComplete.html#method_generateRequest">generateRequest</a> method.</p>
Default: true
render
Boolean | Node
Whether or not to render the widget automatically after init, and optionally, to which parent node.
rendered
Boolean
readonly
Flag indicating whether or not this Widget has been through the render lifecycle phase.
Default: false
schema
Object
<p>A valid configuration object for any of <a href="module_datasource.html">DataSource</a> schema plugins.</p>
Default: null
schemaType
String
<p>A valid type of <a href="module_datasource.html">DataSource</a> schema plugin, such as array, json, xml, etc.</p>
Default: array
shim
Boolean
Boolean flag to indicate whether or not a shim should be added to the Widgets boundingBox, to protect it from select box bleedthrough.
Default: false, for all browsers other than IE6, for which a shim is enabled by default.
showToolbar
Boolean
<p>Indicates if <code>A.BaseCellEditor</code> toolbar is shown.</p>
Default: true
srcNode
String | Node
The DOM node to parse for configuration values, passed to the Widget's HTML_PARSER definition
suppressInputUpdate
Boolean
<p>Whether or not the input field should be updated with selections.</p>
Default: false
tabIndex
Number
<p>Number defining the <code>tabindex</code> of <code>A.BaseCellEditor</code> input.</p>
Default: 1
toolbar
Object
<p>Defines the <code>Toolbar</code> config for the <code>A.BaseCellEditor</code>.</p>
Default: null
typeAhead
Boolean
<p>If <a href="AutoComplete.html#config_autoHighlight">autoHighlight</a> is enabled, whether or not the input field should be automatically updated with the first result as the user types, automatically selecting the portion of the text the user has not typed yet.</p>
Default: false
typeAheadDelay
Number
<p>If <a href="AutoComplete.html#config_typeAhead">typeAhead</a> is true, number of seconds to delay before updating the input. In order to prevent certain race conditions, this value must always be greater than the <a href="AutoComplete.html#config_queryDelay">queryDelay</a>.</p>
Default: 0.2
unescapeValue
Boolean
<p>Indicates whether or not HTML Entities get unescaped on input.</p> <p>See <code>outputFormatter</code> for more details.</p>
Default: true
validator
Object
<p>Defines the <code>FormValidator</code> config for the <code>A.BaseCellEditor</code>.</p>
Default: null
visible
Boolean
<p>Indicates if <code>A.BaseCellEditor</code> is visible.</p> <p>Originally defined in <code>Widget</code>.</p>
Default: false
width
String | Number
String with units, or number, representing the width of the Widget. If a number is provided, the default unit, defined by the Widgets DEF_UNIT, property is used.
Default: EMPTY_STR
x
Number
Page X co-ordinate for the widget. This attribute acts as a facade for the xy attribute. Changes in position can be monitored by listening for xyChange events.
Default: 0
y
Number
Page Y co-ordinate for the widget. This attribute acts as a facade for the xy attribute. Changes in position can be monitored by listening for xyChange events.
Default: 0
zIndex
Number
The z-index to apply to the Widgets boundingBox. Non-numerical values for zIndex will be converted to 0
Default: 0
Events
containerCollapse
<p>Handles the containerCollapse event. Fired when the container is hidden.</p>
Event Payload:
-
event
Event.Facade<p>The containerCollapse event.</p>
containerExpand
<p>Handles the containerExpand event. Fired when the container is shown.</p>
Event Payload:
-
event
Event.Facade<p>The containerExpand event.</p>
containerPopulate
<p>Handles the containerPopulate event. Fired when the container is populated.</p>
Event Payload:
-
event
Event.Facade<p>The containerPopulate event.</p>
dataError
<p>Handles the dataError event. Fired when there is an error accessing the data.</p>
Event Payload:
-
event
Event.Facade<p>The dataError event.</p>
dataRequest
<p>Handles the dataRequest event. Fired when ever a query is sent to the data source.</p>
Event Payload:
-
event
Event.Facade<p>The dataRequest event.</p>
dataReturn
<p>Handles the dataReturn event. Fired when data successfully comes back from the data request.</p>
Event Payload:
-
event
Event.Facade<p>The dataReturn event.</p>
destroy
<p> Lifecycle event for the destroy phase, fired prior to destruction. Invoking the preventDefault method on the event object provided to subscribers will prevent destruction from proceeding. </p> <p> Subscribers to the "after" moment of this event, will be notified after destruction is complete (and as a result cannot prevent destruction). </p>
Event Payload:
-
e
EventFacade<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>Event object</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
init
<p> Lifecycle event for the init phase, fired prior to initialization. Invoking the preventDefault() method on the event object provided to subscribers will prevent initialization from occuring. </p> <p> Subscribers to the "after" momemt of this event, will be notified after initialization of the object is complete (and therefore cannot prevent initialization). </p>
Event Payload:
-
e
EventFacade<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>Event object, with a cfg property which refers to the configuration object passed to the constructor.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
itemArrowFrom
<p>Handles the itemArrowFrom event. Fired when the user navigates via the keyboard away from a selected item.</p>
Event Payload:
-
event
Event.Facade<p>The itemArrowFrom event.</p>
itemArrowTo
<p>Handles the itemArrowTo event. Fired when the user navigates via the keyboard to a selected item.</p>
Event Payload:
-
event
Event.Facade<p>The itemArrowTo event.</p>
itemMouseOut
<p>Handles the itemMouseOut event. Fired when the user mouses away from an item.</p>
Event Payload:
-
event
Event.Facade<p>The itemMouseOut event.</p>
itemMouseOver
<p>Handles the itemMouseOver event. Fired when the user mouses over an item.</p>
Event Payload:
-
event
Event.Facade<p>The itemMouseOver event.</p>
itemSelect
<p>Handles the itemSelect event. Fired when an item in the list is selected.</p>
Event Payload:
-
event
Event.Facade<p>The itemSelect event.</p>
render
Lifecycle event for the render phase, fired prior to rendering the UI for the widget (prior to invoking the widget's renderer method). <p> Subscribers to the "on" moment of this event, will be notified before the widget is rendered. </p> <p> Subscribers to the "after" moment of this event, will be notified after rendering is complete. </p>
Event Payload:
-
e
EventFacade<p><p><p><p><p><p><p><p><p><p><p><p>The Event Facade</p></p></p></p></p></p></p></p></p></p></p></p>
selectionEnforce
<p>Handles the selectionEnforce event. Fired if <a href="Autocomplete.html#config_forceSelection">forceSelection</a> is enabled and the users input element has been cleared because it did not match one of the results.</p>
Event Payload:
-
event
Event.Facade<p>The selectionEnforce event.</p>
textboxBlur
<p>Handles the textboxBlur event. Fired when the user leaves the input element.</p>
Event Payload:
-
event
Event.Facade<p>The textboxBlur event.</p>
textboxChange
<p>Handles the textboxChange event. Fired when the value in the input element is changed.</p>
Event Payload:
-
event
Event.Facade<p>The textboxChange event.</p>
textboxFocus
<p>Handles the textboxFocus event. Fired when user moves focus to the input element.</p>
Event Payload:
-
event
Event.Facade<p>The textboxFocus event.</p>
textboxKey
<p>Handles the textboxKey event. Fired when the input element receives key input.</p>
Event Payload:
-
event
Event.Facade<p>The textboxKey event.</p>
typeAhead
<p>Handles the typeAhead event. Fired when the input element has been pre-filled by the type-ahead feature.</p>
Event Payload:
-
event
Event.Facade<p>The typeAhead event.</p>
unmatchedItemSelect
<p>Handles the unmatchedItemSelect event. Fired when a user selects something that does not match any of the displayed results.</p>
Event Payload:
-
event
Event.Facade<p>The unmatchedItemSelect event.</p>
widget:contentUpdate
Notification event, which widget implementations can fire, when they change the content of the widget. This event has no default behavior and cannot be prevented, so the "on" or "after" moments are effectively equivalent (with on listeners being invoked before after listeners).
Event Payload:
-
e
EventFacade<p><p><p><p><p><p><p><p><p><p><p><p>The Event Facade</p></p></p></p></p></p></p></p></p></p></p></p>