Path to a blank 1x1 image.
Used by <img> nodes in templates that really get their image via CSS background-image.

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

_messages

Holds "next" and "previous" text for paging buttons on drop down.

_setClassAttr

_setDirAttr

_setIdAttr

_setLangAttr

_skipNodeCache

_standby

The standby object to indicate the loading process for grid.
tags:
Protected

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

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.

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.

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.

focused

This widget or a widget it contains has focus, or is "active" because
it was recently clicked.

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.

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

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

selected

currently selected node

srcNodeRef

pointer to original DOM node

style

HTML style attributes as cssText string or name/value hash

templatePath

Path to template (HTML file) for this widget relative to dojo.baseUrl.
Deprecated: use templateString with require([... "dojo/text!..."], ...) instead

templateString

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.

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.

Methods

_beforeFillContent ( )

_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

_createOption ( item , labelFunc
)

Creates an option to appear on the popup menu subclassed by
dijit/form/FilteringSelect.

Parameters

Name

Summary

Type

Usage

item

Object

required

labelFunc

undefined

required

_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

_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

_getGridContainer ( )

Returns the grid container, which contains grid rows.

_onBlur ( )

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

_onFocus ( )

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

_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

_onMouseDown ( evt , target
)

Parameters

Name

Summary

Type

Usage

evt

Event

required

target

DomNode

required

_onMouseOut ( evt , target
)

Parameters

Name

Summary

Type

Usage

evt

Event

required

target

DomNode

required

_onMouseOver ( evt , target
)

Parameters

Name

Summary

Type

Usage

evt

Event

required

target

DomNode

required

_onMouseUp ( evt , target
)

Parameters

Name

Summary

Type

Usage

evt

Event

required

target

DomNode

required

_onSelect ( value
)

Emit onSelect event when an item has been selected.

Parameters

Name

Summary

Type

Usage

value

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.

Parameters

Name

Summary

Type

Usage

name

String

required

value

anything

required

_setOwnerDocumentAttr ( val
)

Parameters

Name

Summary

Type

Usage

val

undefined

required

_setSelectedAttr ( node
)

Does the actual select.

Parameters

Name

Summary

Type

Usage

node

DomNode

required

_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

_setValueAttr ( value
)

Parameters

Name

Summary

Type

Usage

value

Object

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.

Parameters

Name

Summary

Type

Usage

element

DOMNode

required

text

String

required

buildRendering ( )

Construct the UI for this widget, setting this.domNode.
Most widgets will mixin dijit._TemplatedMixin, which implements this method.

clearResultList ( )

Clears the entries in the list.

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.

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

createOptions ( results , options , labelFunc
)

Fills in the items in the list

Parameters

Name

Summary

Type

Usage

results

Array of items

undefined

required

options

The options to the query function of the store

undefined

required

labelFunc

Function to produce a label in the drop down list from a dojo.data item

undefined

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

Parameters

Name

Summary

Type

Usage

fcn

undefined

required

delay

undefined

required

destroy ( preserveDom
)

Destroy this widget, but not its descendants.
This method will, however, destroy internal widgets such as those used within a template.

Parameters

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

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

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

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

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

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

get ( name
)

Get a property from a widget.

Parameters

Name

Summary

Type

Usage

name

The property to get.

undefined

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.

getHighlightedOption ( )

This will be used to highlight the text in the textbox, to allow screen readers to know what is happening in the menu.
Return null since we don't want this feature.

getParent ( )

Returns the parent widget of this widget

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.

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.

onChange ( direction
)

Notifies ComboBox/FilteringSelect that user selected an option.

Parameters

Name

Summary

Type

Usage

direction

Number

required

onClick ( node
)

Parameters

Name

Summary

Type

Usage

node

DomNode

required

onDeselect ( node
)

Remove selected CSS

Parameters

Name

Summary

Type

Usage

node

DomNode

required

onFocus ( )

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

onHover ( node
)

Add hover CSS

Parameters

Name

Summary

Type

Usage

node

DomNode

required

onPage ( direction
)

Notifies ComboBox/FilteringSelect that user clicked to advance to next/previous page.

Parameters

Name

Summary

Type

Usage

direction

Number

required

onSelect ( node
)

Add selected CSS

Parameters

Name

Summary

Type

Usage

node

DomNode

required

onUnhover ( node
)

Remove hover CSS

Parameters

Name

Summary

Type

Usage

node

DomNode

required

own ( )

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

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)

postCreate ( )

Initialize grid for displaying content list.

postMixInProperties ( )

Called after the parameters to the widget have been read-in,
but before the widget template is instantiated. Especially
useful to set properties that are referenced in the widget
template.

selectFirstNode ( )

Select the first displayed item in the list.

selectLastNode ( )

Select the last displayed item in the list

selectNextNode ( )

Select the item just below the current selection.
If nothing selected, select first node.

selectPreviousNode ( )

Select the item just above the current selection.
If nothing selected, select last node (if
you select Previous and try to keep scrolling up the list).

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

showErrorMessage ( show , message
)

Set error message visibility.

Parameters

Name

Summary

Type

Usage

show

undefined

required

message

undefined

required

showGrid ( show
)

Set grid visibility.

Parameters

Name

Summary

Type

Usage

show

undefined

required

showStandby ( show
)

Set standby visibility.

Parameters

Name

Summary

Type

Usage

show

undefined

required

startup ( )

handle processing after any DOM fragments have been actually added to the document.

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

Unsubscribes handle created by this.subscribe.
Also removes handle from this widget's list of subscriptions

Parameters

Name

Summary

Type

Usage

handle

Object

required

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.