Try our conversational search powered by Generative AI!

epi-cms/widget/LinkEditor

Summary

The dialog to insert or edit a link item.

Location

epi-cms/widget/LinkEditor

Extends

Properties

_metadataManager

hiddenFields

The list of fields will be hidden from editing.

templateString

value

Value object to fill in. Used for initial value and to compare

metadata

Metadata object or metadata load deferred.

propertyFilter

Metadata property filter function.

defaultContainerWidget

useDefaultValue

If true use the default value specified in metadata if no value has been set.

readOnly

doLayout

_widgetMap

_uiSetUp

_aspectHandles

baseClass

This class name is applied to the widget's domNode and also may be used to generate names for sub nodes, for example dijitTabContainer-content.

isLayoutContainer

Indicates that this widget is going to call resize() on its children widgets, setting their size, when they become visible.

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:

  1. "ltr"
  2. "rtl"
  3. "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

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

widgetsInTemplate

Should we parse the template to find widgets that might be declared in markup inside it? (Remove for 2.0 and assume true)

_enclosingConsumer

_actions

The list of actions provided by this instance.

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

model

The view model which is a stateful object.

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


Methods

protected method modelClassName()

Represents the model class name that will be used for this widget.

protected method postMixInProperties()

Initialize properties

protected method postCreate()

protected method _setValueAttr(value)

Set selected href.

Parameters
Name Summary Type Usage
value undefined required

protected method onFormCreated(widget)

Parameters
Name Summary Type Usage
widget undefined required

protected method _handleActions(value)

Parameters
Name Summary Type Usage
value undefined required

protected method getFormWidget(widgetName)

Parameters
Name Summary Type Usage
widgetName undefined required

protected method _getAncestorNode(node, classAttr)

Parameters
Name Summary Type Usage
node undefined required
classAttr undefined required

protected method getActions()

Overridden from _ActionProvider to get the select current content action added to the containing widget

protected method isValidValue()

protected method startup()

protected method destroy(preserveDom)

Parameters
Name Summary Type Usage
preserveDom undefined required

protected method _getValueAttr()

protected method _setMetadataAttr(metadata)

Set the metadata.

Parameters
Name Summary Type Usage
metadata

The metadata object.

Object required

protected method _getUseDefaultValueAttr()

protected method onGroupCreated(groupName, groupContainer)

Raised when a group container is created.

Parameters
Name Summary Type Usage
groupName

The field name

String required
groupContainer

The group container

dijit/layout/_LayoutWidget required

protected method onChange(value)

Raised when the form's value is changed.

Parameters
Name Summary Type Usage
value

The new value

undefined required

protected method onFieldCreated(fieldName, widget)

Raised when a field editor widget is created.

Parameters
Name Summary Type Usage
fieldName

The field name

String required
widget

The widget

dijit/_Widget required

protected method _onFormCreated(widget)

Raised when the form is completely created.

Parameters
Name Summary Type Usage
widget

The form container widget

epi/shell/widget/FormContainer required

protected method _setupUI()

create the form and the widgets that it contains, formatted accordingly to the metadata after the form is completed, it calls startup and connects the form widgets to the model.

protected method _onChange()

protected method focus()

protected method layout()

protected method validate()

protected method isValid()

protected method _beforeSetFocus(widget)

Parameters
Name Summary Type Usage
widget undefined required

protected method buildRendering()

protected method resize(changeSize, resultSize)

Call this to resize a widget, or after its size has changed.

Parameters
Name Summary Type Usage
changeSize

Sets the widget to this margin-box size and position. May include any/all of the following properties:

{w: int, h: int, l: int, t: int}
Object optional
resultSize

The margin-box size of this widget after applying changeSize (if changeSize is specified). If caller knows this size and passes it in, we don't need to query the browser to get the size.

{w: int, h: int}
Object optional

protected method _setupChild(child)

Common setup for initial children and children which are added after startup

Parameters
Name Summary Type Usage
child dijit/_WidgetBase required

protected method addChild(child, insertIndex)

Parameters
Name Summary Type Usage
child dijit/_WidgetBase required
insertIndex Integer optional

protected method removeChild(child)

Parameters
Name Summary Type Usage
child dijit/_WidgetBase required

protected method onClick(event)

Connect to this function to receive notifications of mouse click events.

Parameters
Name Summary Type Usage
event

mouse Event

undefined required

protected method onDblClick(event)

Connect to this function to receive notifications of mouse double click events.

Parameters
Name Summary Type Usage
event

mouse Event

undefined required

protected method onKeyDown(event)

Connect to this function to receive notifications of keys being pressed down.

Parameters
Name Summary Type Usage
event

key Event

undefined required

protected method onKeyPress(event)

Connect to this function to receive notifications of printable keys being typed.

Parameters
Name Summary Type Usage
event

key Event

undefined required

protected method onKeyUp(event)

Connect to this function to receive notifications of keys being released.

Parameters
Name Summary Type Usage
event

key Event

undefined required

protected method onMouseDown(event)

Connect to this function to receive notifications of when the mouse button is pressed down.

Parameters
Name Summary Type Usage
event

mouse Event

undefined required

protected method onMouseMove(event)

Connect to this function to receive notifications of when the mouse moves over nodes contained within this widget.

Parameters
Name Summary Type Usage
event

mouse Event

undefined required

protected method onMouseOut(event)

Connect to this function to receive notifications of when the mouse moves off of nodes contained within this widget.

Parameters
Name Summary Type Usage
event

mouse Event

undefined required

protected method onMouseOver(event)

Connect to this function to receive notifications of when the mouse moves onto nodes contained within this widget.

Parameters
Name Summary Type Usage
event

mouse Event

undefined required

protected method onMouseLeave(event)

Connect to this function to receive notifications of when the mouse moves off of this widget.

Parameters
Name Summary Type Usage
event

mouse Event

undefined required

protected method onMouseEnter(event)

Connect to this function to receive notifications of when the mouse moves onto this widget.

Parameters
Name Summary Type Usage
event

mouse Event

undefined required

protected method onMouseUp(event)

Connect to this function to receive notifications of when the mouse button is released.

Parameters
Name Summary Type Usage
event

mouse Event

undefined required

protected method constructor(params, srcNodeRef)

Create the widget.

Parameters
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:

  • use srcNodeRef.innerHTML as my contents
  • if this is a behavioral widget then apply behavior to that srcNodeRef
  • otherwise, replace srcNodeRef with my generated DOM tree
DOMNode|String optional

protected method on(type, func)

Parameters
Name Summary Type Usage
type String|Function required
func Function required

protected method _setFocusedAttr(val)

Parameters
Name Summary Type Usage
val undefined required

protected method setAttribute(attr, value)

Deprecated. Use set() instead.

Parameters
Name Summary Type Usage
attr String required
value anything required

protected method attr(name, value)

Set or get properties on a widget instance.

Parameters
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

protected method 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.

protected method _onShow()

Internal method called when this widget is made visible. See onShow for details.

protected method 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.

protected method 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.

protected method 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.

protected method _setOwnerDocumentAttr(val)

Parameters
Name Summary Type Usage
val undefined required

protected method postscript(params, srcNodeRef)

Kicks off widget instantiation. See create() for details.

Parameters
Name Summary Type Usage
params Object optional
srcNodeRef DomNode|String required

protected method create(params, srcNodeRef)

Kick off the life-cycle of a widget

Parameters
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:

  • use srcNodeRef.innerHTML as my contents
  • if this is a behavioral widget then apply behavior to that srcNodeRef
  • otherwise, replace srcNodeRef with my generated DOM tree
DOMNode|String optional

protected method _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.

protected method destroyRecursive(preserveDom)

Destroy this widget and its descendants

Parameters
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

protected method destroyRendering(preserveDom)

Destroys the DOM nodes associated with this widget

Parameters
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

protected method destroyDescendants(preserveDom)

Recursively destroy the children of this widget and their descendants.

Parameters
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

protected method uninitialize()

Deprecated. Override destroy() instead to implement custom widget tear-down behavior.

protected method _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

Parameters
Name Summary Type Usage
value String||Object required

protected method _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.

Parameters
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

protected method get(name)

Get a property from a widget.

Parameters
Name Summary Type Usage
name

The property to get.

undefined required

protected method set(name, value)

Set a property on a widget

Parameters
Name Summary Type Usage
name

The property to set.

undefined required
value

The value to set in the property.

undefined required

protected method _getAttrNames(name)

Helper function for get() and set(). Caches attribute name values so we don't do the string ops every time.

Parameters
Name Summary Type Usage
name undefined required

protected method _set(name, value)

Helper function to set new value for specified attribute, and call handlers registered with watch() if the value has changed.

Parameters
Name Summary Type Usage
name String required
value anything required

protected method 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).

Parameters
Name Summary Type Usage
type String required
eventObj Object optional
callbackArgs Array optional

protected method _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.

Parameters
Name Summary Type Usage
type String|Function required

protected method toString()

Returns a string that represents the widget

protected method 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.

protected method getParent()

Returns the parent widget of this widget

protected method 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.

Parameters
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());
});

protected method disconnect(handle)

Deprecated, will be removed in 2.0, use handle.remove() instead.

Disconnects handle created by connect.

Parameters
Name Summary Type Usage
handle undefined required

protected method 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.

Parameters
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);
});

protected method 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

Parameters
Name Summary Type Usage
handle Object required

protected method isLeftToRight()

Return this widget's explicit or implicit orientation (true for LTR, false for RTL)

protected method isFocusable()

Return true if this widget can currently be focused and false if not

protected method placeAt(reference, position)

Place this widget somewhere in the DOM based on standard domConstruct.place() conventions.

Parameters
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)

protected method 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.

Parameters
Name Summary Type Usage
text String required
originalDir String required

protected method 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.

Parameters
Name Summary Type Usage
element DOMNode required
text String required

protected method 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).

Parameters
Name Summary Type Usage
fcn undefined required
delay undefined required

protected method _get(name, names)

Private function that does a get based off a hash of names

Parameters
Name Summary Type Usage
name undefined required
names

Hash of names of custom attributes

undefined required

protected method _changeAttrValue(name, value)

Internal helper for directly changing an attribute value.

Parameters
Name Summary Type Usage
name

The property to set.

String required
value

The value to set in the property.

Mixed required

protected method watch(name, callback)

Watches a property for changes

Parameters
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

protected method own()

Track specified handles and remove/destroy them when this instance is destroyed, unless they were already removed/destroyed manually.

protected method onFocus()

Called when the widget becomes "active" because it or a widget inside of it either has focus, or has recently been clicked.

protected method 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.

protected method _onFocus()

This is where widgets do processing for when they are active, such as changing CSS classes. See onFocus() for more details.

protected method _onBlur()

This is where widgets do processing for when they stop being active, such as changing CSS classes. See onBlur() for more details.

protected method hasChildren()

Returns true if widget has child widgets, i.e. if this.containerNode contains widgets.

protected method _getSiblingOfChild(child, dir)

Get the next or previous widget sibling of child

Parameters
Name Summary Type Usage
child dijit/_WidgetBase required
dir

if 1, get the next sibling if -1, get the previous sibling

int required

protected method getIndexOfChild(child)

Gets the index of the child in this container or -1 if not found

Parameters
Name Summary Type Usage
child dijit/_WidgetBase required

protected method _getSibling(which)

Returns next or previous sibling

Parameters
Name Summary Type Usage
which

Either "next" or "previous"

String required

protected method getPreviousSibling()

Returns null if this is the first child of the parent, otherwise returns the next element sibling to the "left".

protected method getNextSibling()

Returns null if this is the last child of the parent, otherwise returns the next element sibling to the "right".

protected method getIndexInParent()

Returns the index of this widget within its container parent. It returns -1 if the parent does not exist, or if the parent is not a dijit._Container

protected method _stringRepl(tmpl)

Does substitution of ${foo} type properties in template string

Parameters
Name Summary Type Usage
tmpl undefined required

protected method _beforeFillContent()

protected method _fillContent(source)

Relocate source contents to templated container node. this.containerNode must be able to receive children, or exceptions will be thrown.

Parameters
Name Summary Type Usage
source DomNode required

protected method _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.

Parameters
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

protected method _registerSelf()

Registers this provider in closest found action consumer.

protected method _unregisterSelf()

Unregisters this provider in closest found action consumer provider list.

protected method _getEnclosingActionConsumer()

Gets the closest parent widget that is action aonsumer. Returns null if enclosing action consumer widget is not found.

protected method hasAction(actionName)

Check whether an action with the specified name exists in this provider.

Parameters
Name Summary Type Usage
actionName

Name of the action to check for

String required

protected method setActionProperty(actionOrName, property, value)

Changes the property on a registered action

Parameters
Name Summary Type Usage
actionOrName

The action object or the name of the action to change

Object|String required
property

name of the property to alter.

String required
value

The new value of the action property

Object required

protected method addActions(actions)

Adds an action or an array of actions to the action list.

Parameters
Name Summary Type Usage
actions

A toolbar action definition, or an array of toolbar action definitions to add in the list.

Example of adding two actions:

toolbar.addActions([
    {
        name: "myAction1",
        label: "Do my action",
        action: console.log
    },
    {
        name: "myAction2",
        label: "Say hello",
        action: alert("Hello!")
    }]);
Object|Array required

protected method removeActions(actions)

Remove a single action or an array of actions

Parameters
Name Summary Type Usage
actions

The action(s) to remove

Object|Array required

protected method _removeAction(action)

Removes a single action and raises the onActionRemoved event

Parameters
Name Summary Type Usage
action undefined required

protected method _addAction(action)

Adds a single action to the action collection and calls the onActionAdded event

Parameters
Name Summary Type Usage
action undefined required

protected method onActionAdded(action)

Event raised when a new action has been added to the provider

Parameters
Name Summary Type Usage
action

The added action

Object required

protected method onActionRemoved(action)

Event raised when an action has been removed from the provider

Parameters
Name Summary Type Usage
action

The removed action

Object required

protected method onActionPropertyChanged(action, propertyName, propertyValue)

Event raised when a property of an action has changed

Parameters
Name Summary Type Usage
action

The action for which the property changed

Object required
propertyName

Name of the changed property

String required
propertyValue

The new value of the updated property

Object required

protected method executeDialog()

Call this method to ask the container dialog to execute.

protected method cancelDialog()

Call this method to ask the container dialog to cancel.

protected method _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.

Parameters
Name Summary Type Usage
event Event required

protected method _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).

protected method _subnodeCssMouseEvent(node, clazz, evt)

Handler for hover/active mouse event on widget's subnode

Parameters
Name Summary Type Usage
node undefined required
clazz undefined required
evt undefined required

protected method _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.

Parameters
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

protected method _setModelAttr(value)

Parameters
Name Summary Type Usage
value undefined required

protected method _setupModelBindings()

protected method _modelWatch(modelProperty, oldValue, value)

Parameters
Name Summary Type Usage
modelProperty undefined required
oldValue undefined required
value undefined required

protected method _getNormalizedBindingMap()

protected method ownByKey(key, handle)

Own a set of handles

Parameters
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

protected method destroyByKey(key)

Destroy a set of handles

Parameters
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

protected method _findOwnedByKey(key)

find a set of owned handles

Parameters
Name Summary Type Usage
key Object required

Parameters
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:

  • use srcNodeRef.innerHTML as my contents
  • if this is a behavioral widget then apply behavior to that srcNodeRef
  • otherwise, replace srcNodeRef with my generated DOM tree
DOMNode|String optional