epi-cms/contentediting/editors/CollectionEditor
Location
epi-cms/contentediting/editors/CollectionEditor
Extends
Properties
templateString
The widget's template.
multiple
Indicates that the widget's value is array-like.
baseClass
The widget's base css class.
value
The widget's value.
model
The widget's model.
itemType
The collection item type on the server. This is used to retrieve item metadata.
generateColumns
excludedColumns
List of columns those are excluded from generated columns
includedColumns
List of columns which are configured to assemble the grid.
gridSettings
The grid settings.
itemModelType
Item Model constructor. Default is epi-cms/contentediting/editors/model/CollectionEditorItemModel.
useFullWidth
Specifies that this widget should be rendered in full width.
_noDataMessage
_currentProviderHandler
id
A unique, opaque ID string that can be assigned by users or by the system. If the developer passes an ID which is known not to be unique, the specified ID is ignored and the system-generated ID is used instead.
_setIdAttr
lang
Rarely used. Overrides the default Dojo locale used to render this widget, as defined by the HTML LANG attribute. Value must be among the list of locales specified during by the Dojo bootstrap, formatted according to RFC 3066 (like en-us).
_setLangAttr
dir
Bi-directional support, as defined by the HTML DIR attribute. Either left-to-right "ltr" or right-to-left "rtl". If undefined, widgets renders in page's default direction.
_setDirAttr
textDir
Bi-directional support, the main variable which is responsible for the direction of the text. The text direction can be different than the GUI direction by using this parameter in creation of a widget.
Allowed values:
- "ltr"
- "rtl"
- "auto" - contextual the direction of a text defined by first strong letter.
By default is as the page direction.
class
_setClassAttr
style
HTML style attributes as cssText string or name/value hash
title
HTML title attribute.
For form widgets this specifies a tooltip to display when hovering over the widget (just like the native HTML title attribute).
For TitlePane or for when this widget is a child of a TabContainer, AccordionContainer, etc., it's used to specify the tab label, accordion pane title, etc.
tooltip
When this widget's title attribute is used to for a tab label, accordion pane title, etc., this specifies the tooltip to appear when the mouse is hovered over that text.
srcNodeRef
pointer to original DOM node
domNode
This is our visible representation of the widget! Other DOM Nodes may by assigned to other properties, usually through the template system's data-dojo-attach-point syntax, but the domNode property is the canonical "top level" node in widget UI.
containerNode
Designates where children of the source DOM node will be placed. "Children" in this case refers to both DOM nodes and widgets. For example, for myWidget:
<div data-dojo-type=myWidget>
<b> here's a plain DOM node
<span data-dojo-type=subWidget>and a widget</span>
<i> and another plain DOM node </i>
</div>
containerNode would point to:
<b> here's a plain DOM node
<span data-dojo-type=subWidget>and a widget</span>
<i> and another plain DOM node </i>
In templated widgets, "containerNode" is set via a data-dojo-attach-point assignment.
containerNode must be defined for any widget that accepts innerHTML (like ContentPane or BorderContainer or even Button), and conversely is null for widgets that don't, like TextBox.
ownerDocument
The document this widget belongs to. If not specified to constructor, will default to srcNodeRef.ownerDocument, or if no sourceRef specified, then to dojo/_base/window::doc
_started
startup() has completed.
attributeMap
Deprecated. Instead of attributeMap, widget should have a _setXXXAttr attribute for each XXX attribute to be mapped to the DOM.
attributeMap sets up a "binding" between attributes (aka properties) of the widget and the widget's DOM. Changes to widget attributes listed in attributeMap will be reflected into the DOM.
For example, calling set('title', 'hello') on a TitlePane will automatically cause the TitlePane's DOM to update with the new title.
attributeMap is a hash where the key is an attribute of the widget, and the value reflects a binding to a:
DOM node attribute
focus: {node: "focusNode", type: "attribute"} Maps this.focus to this.focusNode.focus
DOM node innerHTML
title: { node: "titleNode", type: "innerHTML" } Maps this.title to this.titleNode.innerHTML
DOM node innerText
title: { node: "titleNode", type: "innerText" } Maps this.title to this.titleNode.innerText
DOM node CSS class
myClass: { node: "domNode", type: "class" } Maps this.myClass to this.domNode.className
If the value is an array, then each element in the array matches one of the formats of the above list.
There are also some shorthands for backwards compatibility:
- string --> { node: string, type: "attribute" }, for example:
"focusNode" ---> { node: "focusNode", type: "attribute" }
- "" --> { node: "domNode", type: "attribute" }
_blankGif
Path to a blank 1x1 image.
Used by <img>
nodes in templates that really get their image via CSS background-image.
_attrPairNames
focused
This widget or a widget it contains has focus, or is "active" because it was recently clicked.
_focusManager
dndType
Defines a type of widget.
templatePath
Path to template (HTML file) for this widget relative to dojo.baseUrl. Deprecated: use templateString with require([... "dojo/text!..."], ...) instead
_skipNodeCache
_earlyTemplatedStartup
A fallback to preserve the 1.0 - 1.3 behavior of children in templates having their startup called before the parent widget fires postCreate. Defaults to 'false', causing child widgets to have their .startup() called immediately before a parent widget .startup(), but always after the parent .postCreate(). Set to 'true' to re-enable to previous, arguably broken, behavior.
_attachPoints
List of widget attribute names associated with data-dojo-attach-point=... in the template, ex: ["containerNode", "labelNode"]
_attachEvents
List of connections associated with data-dojo-attach-event=... in the template
modelBindingMap
The binding map. Each key in the map must be an observable property in the model and each item in the map is a list of widget properties.
_ownedByKey
The owned handles
_itemEditor
_dialog
dialogParams
_editingItemIndex
required
User is required to enter data into this field.
missingMessage
Message which is displayed when required is true and value is empty.
_valueValidationTooltip
The validation tooltip.
cssStateNodes
List of sub-nodes within the widget that need CSS classes applied on mouse hover/press and focus
Each entry in the hash is a an attachpoint names (like "upArrowButton") mapped to a CSS class names (like "dijitUpArrowButton"). Example:
{
"upArrowButton": "dijitUpArrowButton",
"downArrowButton": "dijitDownArrowButton"
}
The above will set the CSS class dijitUpArrowButton to the this.upArrowButton DOMNode when it
is hovered, etc.
hovering
True if cursor is over this widget
active
True if mouse was pressed while over this widget, and hasn't been released yet
isShowingChildDialog
Indicates whether a child dialog window is currently being displayed.
_openedChildDialog
A reference to the currently open child dialog
_waitingForFocus
A flag indicating that the child dialog has been closed and we're waiting for a focus on this widget
Methods
modelType()
The widget's model class. By default it is epi-cms/contentediting/editors/model/CollectionEditorModel
gridType()
The grid class. By default it is OnDemandGrid with Formatter, Selection, Keyboard, and DnD supports.
onChange(value)
Triggered when the widget's value changes.
Name | Summary | Type | Usage |
---|---|---|---|
value | undefined | required |
_dndNodeCreator(item, hint)
Custom DnD avatar creator method
Name | Summary | Type | Usage |
---|---|---|---|
item | Object | required | |
hint | Object | required |
onDndDrop(dndData, source, nodes, copy)
Name | Summary | Type | Usage |
---|---|---|---|
dndData | undefined | required | |
source | undefined | required | |
nodes | undefined | required | |
copy | undefined | required |
_onGridRowSelect(e)
Makes sure the right commands are available in the context menu when selecting a row in the grid.
Name | Summary | Type | Usage |
---|---|---|---|
e | undefined | required |
onGridRowClick(e)
Makes sure the right commands are available in the context menu when selecting a row in the grid.
Name | Summary | Type | Usage |
---|---|---|---|
e | undefined | required |
onGridRowDblClick(e)
Makes sure the right commands are available in the context menu when selecting a row in the grid.
Name | Summary | Type | Usage |
---|---|---|---|
e | undefined | required |
_onItemsChanged(items)
The model's itemsChanged event handler.
Name | Summary | Type | Usage |
---|---|---|---|
items | The items list (Note that it is an item model instance, not the raw data item). |
Array | required |
onClick(event)
Connect to this function to receive notifications of mouse click events.
Name | Summary | Type | Usage |
---|---|---|---|
event | mouse Event |
undefined | required |
onDblClick(event)
Connect to this function to receive notifications of mouse double click events.
Name | Summary | Type | Usage |
---|---|---|---|
event | mouse Event |
undefined | required |
onKeyDown(event)
Connect to this function to receive notifications of keys being pressed down.
Name | Summary | Type | Usage |
---|---|---|---|
event | key Event |
undefined | required |
onKeyPress(event)
Connect to this function to receive notifications of printable keys being typed.
Name | Summary | Type | Usage |
---|---|---|---|
event | key Event |
undefined | required |
onKeyUp(event)
Connect to this function to receive notifications of keys being released.
Name | Summary | Type | Usage |
---|---|---|---|
event | key Event |
undefined | required |
onMouseDown(event)
Connect to this function to receive notifications of when the mouse button is pressed down.
Name | Summary | Type | Usage |
---|---|---|---|
event | mouse Event |
undefined | required |
onMouseMove(event)
Connect to this function to receive notifications of when the mouse moves over nodes contained within this widget.
Name | Summary | Type | Usage |
---|---|---|---|
event | mouse Event |
undefined | required |
onMouseOut(event)
Connect to this function to receive notifications of when the mouse moves off of nodes contained within this widget.
Name | Summary | Type | Usage |
---|---|---|---|
event | mouse Event |
undefined | required |
onMouseOver(event)
Connect to this function to receive notifications of when the mouse moves onto nodes contained within this widget.
Name | Summary | Type | Usage |
---|---|---|---|
event | mouse Event |
undefined | required |
onMouseLeave(event)
Connect to this function to receive notifications of when the mouse moves off of this widget.
Name | Summary | Type | Usage |
---|---|---|---|
event | mouse Event |
undefined | required |
onMouseEnter(event)
Connect to this function to receive notifications of when the mouse moves onto this widget.
Name | Summary | Type | Usage |
---|---|---|---|
event | mouse Event |
undefined | required |
onMouseUp(event)
Connect to this function to receive notifications of when the mouse button is released.
Name | Summary | Type | Usage |
---|---|---|---|
event | mouse Event |
undefined | required |
constructor(params, srcNodeRef)
Create the widget.
Name | Summary | Type | Usage |
---|---|---|---|
params | Hash of initialization parameters for widget, including scalar values (like title, duration etc.) and functions, typically callbacks like onClick. The hash can contain any of the widget's properties, excluding read-only properties. |
Object|null | required |
srcNodeRef | If a srcNodeRef (DOM node) is specified:
|
DOMNode|String | optional |
on(type, func)
Name | Summary | Type | Usage |
---|---|---|---|
type | String|Function | required | |
func | Function | required |
setAttribute(attr, value)
Deprecated. Use set() instead.
Name | Summary | Type | Usage |
---|---|---|---|
attr | String | required | |
value | anything | required |
attr(name, value)
Set or get properties on a widget instance.
Name | Summary | Type | Usage |
---|---|---|---|
name | The property to get or set. If an object is passed here and not a string, its keys are used as names of attributes to be set and the value of the object as values to set in the widget. |
String|Object | required |
value | Optional. If provided, attr() operates as a setter. If omitted, the current value of the named property is returned. |
Object | optional |
getDescendants()
Returns all the widgets contained by this, i.e., all widgets underneath this.containerNode. This method should generally be avoided as it returns widgets declared in templates, which are supposed to be internal/hidden, but it's left here for back-compat reasons.
onShow()
Called when this widget becomes the selected pane in a
dijit/layout/TabContainer
, dijit/layout/StackContainer
,
dijit/layout/AccordionContainer
, etc.
Also called to indicate display of a dijit.Dialog
, dijit.TooltipDialog
, or dijit.TitlePane
.
onHide()
Called when another widget becomes the selected pane in a
dijit/layout/TabContainer
, dijit/layout/StackContainer
,
dijit/layout/AccordionContainer
, etc.
Also called to indicate hide of a dijit.Dialog
, dijit.TooltipDialog
, or dijit.TitlePane
.
onClose()
Called when this widget is being displayed as a popup (ex: a Calendar popped up from a DateTextBox), and it is hidden. This is called from the dijit.popup code, and should not be called directly.
Also used as a parameter for children of dijit/layout/StackContainer
or subclasses.
Callback if a user tries to close the child. Child will be closed if this function returns true.
postscript(params, srcNodeRef)
Kicks off widget instantiation. See create() for details.
Name | Summary | Type | Usage |
---|---|---|---|
params | Object | optional | |
srcNodeRef | DomNode|String | required |
create(params, srcNodeRef)
Kick off the life-cycle of a widget
Name | Summary | Type | Usage |
---|---|---|---|
params | Hash of initialization parameters for widget, including scalar values (like title, duration etc.) and functions, typically callbacks like onClick. The hash can contain any of the widget's properties, excluding read-only properties. |
Object|null | required |
srcNodeRef | If a srcNodeRef (DOM node) is specified:
|
DOMNode|String | optional |
_applyAttributes()
Step during widget creation to copy widget attributes to the DOM according to attributeMap and _setXXXAttr objects, and also to call custom _setXXXAttr() methods.
Skips over blank/false attribute values, unless they were explicitly specified as parameters to the widget, since those are the default anyway, and setting tabIndex="" is different than not setting tabIndex at all.
For backwards-compatibility reasons attributeMap overrides _setXXXAttr when _setXXXAttr is a hash/string/array, but _setXXXAttr as a functions override attributeMap.
buildRendering()
Construct the UI for this widget, setting this.domNode.
Most widgets will mixin dijit._TemplatedMixin
, which implements this method.
destroyRecursive(preserveDom)
Destroy this widget and its descendants
Name | Summary | Type | Usage |
---|---|---|---|
preserveDom | If true, this method will leave the original DOM structure alone of descendant Widgets. Note: This will NOT work with dijit._Templated widgets. |
Boolean | optional |
destroy(preserveDom)
Destroy this widget, but not its descendants. This method will, however, destroy internal widgets such as those used within a template.
Name | Summary | Type | Usage |
---|---|---|---|
preserveDom | If true, this method will leave the original DOM structure alone. Note: This will not yet work with _Templated widgets |
Boolean | required |
destroyRendering(preserveDom)
Destroys the DOM nodes associated with this widget
Name | Summary | Type | Usage |
---|---|---|---|
preserveDom | If true, this method will leave the original DOM structure alone during tear-down. Note: this will not work with _Templated widgets yet. |
Boolean | optional |
destroyDescendants(preserveDom)
Recursively destroy the children of this widget and their descendants.
Name | Summary | Type | Usage |
---|---|---|---|
preserveDom | If true, the preserveDom attribute is passed to all descendant widget's .destroy() method. Not for use with _Templated widgets. |
Boolean | optional |
uninitialize()
Deprecated. Override destroy() instead to implement custom widget tear-down behavior.
_setStyleAttr(value)
Sets the style attribute of the widget according to value, which is either a hash like {height: "5px", width: "3px"} or a plain string
Name | Summary | Type | Usage |
---|---|---|---|
value | String||Object | required |
_attrToDom(attr, value, commands)
Reflect a widget attribute (title, tabIndex, duration etc.) to the widget DOM, as specified by commands parameter. If commands isn't specified then it's looked up from attributeMap. Note some attributes like "type" cannot be processed this way as they are not mutable.
Name | Summary | Type | Usage |
---|---|---|---|
attr | Name of member variable (ex: "focusNode" maps to this.focusNode) pointing to DOMNode inside the widget, or alternately pointing to a subwidget |
String | required |
value | String | required | |
commands | Object | optional |
get(name)
Get a property from a widget.
Name | Summary | Type | Usage |
---|---|---|---|
name | The property to get. |
undefined | required |
set(name, value)
Set a property on a widget
Name | Summary | Type | Usage |
---|---|---|---|
name | The property to set. |
undefined | required |
value | The value to set in the property. |
undefined | required |
_getAttrNames(name)
Helper function for get() and set(). Caches attribute name values so we don't do the string ops every time.
Name | Summary | Type | Usage |
---|---|---|---|
name | undefined | required |
_set(name, value)
Helper function to set new value for specified attribute, and call handlers registered with watch() if the value has changed.
Name | Summary | Type | Usage |
---|---|---|---|
name | String | required | |
value | anything | required |
emit(type, eventObj, callbackArgs)
Used by widgets to signal that a synthetic event occurred, ex:
myWidget.emit("attrmodified-selectedChildWidget", {}).
Emits an event on this.domNode named type.toLowerCase(), based on eventObj. Also calls onType() method, if present, and returns value from that method. By default passes eventObj to callback, but will pass callbackArgs instead, if specified. Modifies eventObj by adding missing parameters (bubbles, cancelable, widget).
Name | Summary | Type | Usage |
---|---|---|---|
type | String | required | |
eventObj | Object | optional | |
callbackArgs | Array | optional |
_onMap(type)
Maps on() type parameter (ex: "mousemove") to method name (ex: "onMouseMove"). If type is a synthetic event like touch.press then returns undefined.
Name | Summary | Type | Usage |
---|---|---|---|
type | String|Function | required |
getChildren()
Returns all the widgets contained by this, i.e., all widgets underneath this.containerNode. Does not return nested widgets, nor widgets that are part of this widget's template.
connect(obj, event, method)
Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead.
Connects specified obj/event to specified method of this object and registers for disconnect() on widget destroy.
Provide widget-specific analog to dojo.connect, except with the
implicit use of this widget as the target object.
Events connected with this.connect
are disconnected upon
destruction.
Name | Summary | Type | Usage |
---|---|---|---|
obj | Object|null | required | |
event | String|Function | required | |
method | String|Function | required |
Examples
var btn = new Button();
// when foo.bar() is called, call the listener we're going to
// provide in the scope of btn
btn.connect(foo, "bar", function(){
console.debug(this.toString());
});
disconnect(handle)
Deprecated, will be removed in 2.0, use handle.remove() instead.
Disconnects handle created by connect
.
Name | Summary | Type | Usage |
---|---|---|---|
handle | undefined | required |
subscribe(t, method)
Deprecated, will be removed in 2.0, use this.own(topic.subscribe()) instead.
Subscribes to the specified topic and calls the specified method of this object and registers for unsubscribe() on widget destroy.
Provide widget-specific analog to dojo.subscribe, except with the implicit use of this widget as the target object.
Name | Summary | Type | Usage |
---|---|---|---|
t | The topic |
String | required |
method | The callback |
Function | required |
Examples
var btn = new Button();
// when /my/topic is published, this button changes its label to
// be the parameter of the topic.
btn.subscribe("/my/topic", function(v){
this.set("label", v);
});
unsubscribe(handle)
Deprecated, will be removed in 2.0, use handle.remove() instead.
Unsubscribes handle created by this.subscribe. Also removes handle from this widget's list of subscriptions
Name | Summary | Type | Usage |
---|---|---|---|
handle | Object | required |
placeAt(reference, position)
Place this widget somewhere in the DOM based on standard domConstruct.place() conventions.
Name | Summary | Type | Usage |
---|---|---|---|
reference | Widget, DOMNode, or id of widget or DOMNode |
String|DomNode|_Widget | required |
position | If reference is a widget (or id of widget), and that widget has an ".addChild" method, it will be called passing this widget instance into that method, supplying the optional position index passed. In this case position (if specified) should be an integer. If reference is a DOMNode (or id matching a DOMNode but not a widget), the position argument can be a numeric index or a string "first", "last", "before", or "after", same as dojo/dom-construct::place(). |
String|Int | optional |
Examples
// create a Button with no srcNodeRef, and place it in the body:
var button = new Button({ label:"click" }).placeAt(win.body());
// now, 'button' is still the widget reference to the newly created button
button.on("click", function(e){ console.log('click'); }));
// create a button out of a node with id="src" and append it to id="wrapper":
var button = new Button({},"src").placeAt("wrapper");
// place a new button as the first element of some div
var button = new Button({ label:"click" }).placeAt("wrapper","first");
// create a contentpane and add it to a TabContainer
var tc = dijit.byId("myTabs");
new ContentPane({ href:"foo.html", title:"Wow!" }).placeAt(tc)
getTextDir(text, originalDir)
Return direction of the text. The function overridden in the _BidiSupport module, its main purpose is to calculate the direction of the text, if was defined by the programmer through textDir.
Name | Summary | Type | Usage |
---|---|---|---|
text | String | required | |
originalDir | String | required |
applyTextDir(element, text)
The function overridden in the _BidiSupport module, originally used for setting element.dir according to this.textDir. In this case does nothing.
Name | Summary | Type | Usage |
---|---|---|---|
element | DOMNode | required | |
text | String | required |
defer(fcn, delay)
Wrapper to setTimeout to avoid deferred functions executing after the originating widget has been destroyed. Returns an object handle with a remove method (that returns null) (replaces clearTimeout).
Name | Summary | Type | Usage |
---|---|---|---|
fcn | undefined | required | |
delay | undefined | required |
_get(name, names)
Private function that does a get based off a hash of names
Name | Summary | Type | Usage |
---|---|---|---|
name | undefined | required | |
names | Hash of names of custom attributes |
undefined | required |
_changeAttrValue(name, value)
Internal helper for directly changing an attribute value.
Name | Summary | Type | Usage |
---|---|---|---|
name | The property to set. |
String | required |
value | The value to set in the property. |
Mixed | required |
watch(name, callback)
Watches a property for changes
Name | Summary | Type | Usage |
---|---|---|---|
name | Indicates the property to watch. This is optional (the callback may be the only parameter), and if omitted, all the properties will be watched |
String | optional |
callback | The function to execute when the property changes. This will be called after the property has been changed. The callback will be called with the |this| set to the instance, the first argument as the name of the property, the second argument as the old value and the third argument as the new value. |
Function | required |
own()
Track specified handles and remove/destroy them when this instance is destroyed, unless they were already removed/destroyed manually.
onFocus()
Called when the widget becomes "active" because it or a widget inside of it either has focus, or has recently been clicked.
onBlur()
Called when the widget stops being "active" because focus moved to something outside of it, or the user clicked somewhere outside of it, or the widget was hidden.
_onFocus()
This is where widgets do processing for when they are active, such as changing CSS classes. See onFocus() for more details.
_onBlur()
This is where widgets do processing for when they stop being active, such as changing CSS classes. See onBlur() for more details.
_stringRepl(tmpl)
Does substitution of ${foo} type properties in template string
Name | Summary | Type | Usage |
---|---|---|---|
tmpl | undefined | required |
_fillContent(source)
Relocate source contents to templated container node. this.containerNode must be able to receive children, or exceptions will be thrown.
Name | Summary | Type | Usage |
---|---|---|---|
source | DomNode | required |
_attachTemplateNodes(rootNode, getAttrFunc)
Iterate through the template and attach functions and nodes accordingly. Alternately, if rootNode is an array of widgets, then will process data-dojo-attach-point etc. for those widgets.
Name | Summary | Type | Usage |
---|---|---|---|
rootNode | the node to search for properties. All children will be searched. |
DomNode|Widget[] | required |
getAttrFunc | a function which will be used to obtain property for a given DomNode/Widget |
Function | required |
_modelWatch(modelProperty, oldValue, value)
Name | Summary | Type | Usage |
---|---|---|---|
modelProperty | undefined | required | |
oldValue | undefined | required | |
value | undefined | required |
ownByKey(key, handle)
Own a set of handles
Name | Summary | Type | Usage |
---|---|---|---|
key | The key to identify the set of handles. It can be a model object, but note that the same instance must be used when destroying the handles |
Object | required |
handle | The handle |
Object... | required |
destroyByKey(key)
Destroy a set of handles
Name | Summary | Type | Usage |
---|---|---|---|
key | The key to identify the set of handles. It can be a model object, but note that the same instance must be used as when owning the handles |
undefined | required |
_findOwnedByKey(key)
find a set of owned handles
Name | Summary | Type | Usage |
---|---|---|---|
key | Object | required |
_onToggleItemEditor(item, index)
The model's toggleItemEditor event handler.
Name | Summary | Type | Usage |
---|---|---|---|
item | The item to edit (Note that it is an item model instance, not the raw data item). If null, open item editor to create new item. |
Object | required |
index | undefined | required |
_getDialogTitleText(existingItem)
Name | Summary | Type | Usage |
---|---|---|---|
existingItem | undefined | required |
_setDialogConfirmActionText(existingItem)
Name | Summary | Type | Usage |
---|---|---|---|
existingItem | undefined | required |
validate(isFocused)
Show missing or invalid messages if appropriate, and highlight textbox field.
Name | Summary | Type | Usage |
---|---|---|---|
isFocused | Boolean | required |
isValid(isFocused)
Check if widget's value is valid.
Name | Summary | Type | Usage |
---|---|---|---|
isFocused | Indicate that the widget is being focused. |
Boolean | required |
displayMessage(message)
Overridable method to display validation errors/hints. By default uses a tooltip.
Name | Summary | Type | Usage |
---|---|---|---|
message | String | required |
getErrorMessage(isFocused)
Return an error message to show if appropriate
Name | Summary | Type | Usage |
---|---|---|---|
isFocused | Boolean | required |
_cssMouseEvent(event)
Handler for CSS event on this.domNode. Sets hovering and active properties depending on mouse state, which triggers _setStateClass() to set appropriate CSS classes for this.domNode.
Name | Summary | Type | Usage |
---|---|---|---|
event | Event | required |
_setStateClass()
Update the visual state of the widget by setting the css classes on this.domNode (or this.stateNode if defined) by combining this.baseClass with various suffixes that represent the current widget state(s).
_subnodeCssMouseEvent(node, clazz, evt)
Handler for hover/active mouse event on widget's subnode
Name | Summary | Type | Usage |
---|---|---|---|
node | undefined | required | |
clazz | undefined | required | |
evt | undefined | required |
_trackMouseState(node, clazz)
Track mouse/focus events on specified node and set CSS class on that node to indicate current state. Usually not called directly, but via cssStateNodes attribute.
Name | Summary | Type | Usage |
---|---|---|---|
node | Should be a sub-node of the widget, not the top node (this.domNode), since the top node is handled specially and automatically just by mixing in this class. |
DomNode | required |
clazz | CSS class name (ex: dijitSliderUpArrow) |
String | required |
_onPopupOpen(openArgs)
Called before a popup is opened. Checks if the popup is opened for a descendant, and if so it's assumed to be a child dialog.
Name | Summary | Type | Usage |
---|---|---|---|
openArgs | undefined | required |
Name | Summary | Type | Usage |
---|---|---|---|
params | Hash of initialization parameters for widget, including scalar values (like title, duration etc.) and functions, typically callbacks like onClick. The hash can contain any of the widget's properties, excluding read-only properties. |
Object|null | required |
srcNodeRef | If a srcNodeRef (DOM node) is specified:
|
DOMNode|String | optional |