Step during widget creation to copy all widget attributes to the
DOM as per attributeMap and _setXXXAttr functions.
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.
It processes the attributes in the attribute map first, and then
it goes through and processes the attributes for the _setXXXAttr
functions that have been specified
Returns an option object based off the given item. The "value"
of the option item will be the identity of the item, the "label"
of the option will be the label of the item. If the item contains
children, the children value of the item will be set
Called when the value of the widget is set. Calls onChange() if appropriate
Parameter
Type
Usage
Description
newValue
anything
required
the new value
priorityChange
Boolean
optional
For a slider, for example, dragging the slider is priorityChange==false,
but on mouse up, it's priorityChange==true. If intermediateChanges==true,
onChange is only called form priorityChange=true events.
Called when someone connects to one of my handlers.
"Turn on" that handler if it isn't active yet.
This is also called for every single initialization parameter
so need to do nothing for parameters like "id".
Sets _hovering, _active, and stateModifier properties depending on mouse state,
then calls setStateClass() to set appropriate CSS classes for this.domNode.
To get a different CSS class for hover, send onmouseover and onmouseout events to this method.
To get a different CSS class while mouse button is depressed, send onmousedown to this method.
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).
In the case where a widget has multiple
states, it sets the class based on all possible
combinations. For example, an invalid form widget that is being hovered
will be "dijitInput dijitInputInvalid dijitInputHover dijitInputInvalidHover".
For complex widgets with multiple regions, there can be various hover/active states,
such as "Hover" or "CloseButtonHover" (for tab buttons).
This is controlled by a stateModifier="CloseButton" attribute on the close button node.
The widget may have one or more of the following states, determined
Adds an option or options to the end of the select. If value
of the option is empty or missing, a separator is created instead.
Passing in an array of options will yield slightly better performance
since the children are only loaded once.
Get or set named properties on a widget. If no value is
provided, the current value of the attribute is returned,
potentially via a getter method. If a value is provided, then
the method acts as a setter, assigning the value to the name,
potentially calling any explicitly provided setters to handle
the operation. For instance, if the widget has properties "foo"
Parameter
Type
Usage
Description
name
String|Object
required
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.
value
Object
optional
Optional. If provided, attr() operates as a setter. If omitted,
the current value of the named property is returned.
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.
This version of connect also provides a special "ondijitclick"
event which triggers on a click or space or enter keyup
This is the generic "destructor" function that all widget users
should call to cleanly discard with a widget. Once a widget is
destroyed, it is removed from the manager object.
Parameter
Type
Usage
Description
preserveDom
Boolean
optional
If true, this method will leave the original DOM structure
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.
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.
If passed in as a string, that string is used to look up the option
in the array of options - based on the value property.
(See dijit.form.__SelectOption).
If passed in a number, then the option with the given index (0-based)
within this select will be returned.
If passed in a dijit.form.__SelectOption, the same option will be
returned if and only if it exists within this select.
If passed an array, then an array will be returned with each element
in the array being looked up.
If not passed a value, then all options will be returned
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.
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.
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.
a function that can be connected to in order to receive a
notification that the store has finished loading and all options
from that store are available
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.
Place this widget's domNode reference somewhere in the DOM based
on standard dojo.place conventions, or passing a Widget reference that
contains and addChild member.
A convenience function provided in all _Widgets, providing a simple
shorthand mechanism to put an existing (or newly created) Widget
somewhere in the dom, and allow chaining.
Parameter
Type
Usage
Description
reference
String|DomNode|_Widget
required
The String id of a domNode, a domNode reference, or a reference to a Widget posessing
an addChild method.
position
String|Int
optional
If passed a string or domNode reference, the position argument
sets up our event handling that we need for functioning
as a select
Called after the DOM fragment has been created, but not necessarily
added to the document. Do not include any operations which rely on
node dimensions or placement.
Removes the given option or options. You can remove by string
(in which case the value is removed), number (in which case the
index in the options array is removed), or select option (in
which case, the select option with a matching value is removed).
You can also pass in an array of those values for a slightly
better performance since the children are only loaded once.
Sets the store you would like to use with this select widget.
The selected value is the value of the new store to set. This
function returns the original store, in case you want to reuse
it or something.
Parameter
Type
Usage
Description
store
dojo.data.api.Identity
required
The store you would like to use - it MUST implement Identity,
and MAY implement Notification.
selectedValue
anything
optional
The value that this widget should set itself to *after* the store
has been loaded
fetchArgs
Object
optional
The arguments that will be passed to the store's fetch() function
Called after a widget and its children have been created and added to the page,
and all related widgets have finished their create() cycle, up through postCreate().
This is useful for composite widgets that need to control or layout sub-widgets.
Many layout widgets can use this as a wiring phase.
When a widget is cast to a string, this method will be used to generate the
output. Currently, it does not implement any sort of reversible
serialization.
Updates the values of the given option. The option to update
is matched based on the value of the entered option. Passing
in an array of new options will yeild better performance since
the children will only be loaded once.
Show missing or invalid messages if appropriate, and highlight textbox field.
Used when a select is initially set to no value and the user is required to
set the value.
Indicates that changes to the value should call onChange() callback.
This is false during widget initialization, to avoid calling onChange()
when the initial value is set.
Parameter for children of dijit.layout.StackContainer or subclasses.
True if user can close (destroy) this child, such as (for example) clicking the X on the tab.
This is our visible representation of the widget! Other DOM
Nodes may by assigned to other properties, usually through the
template system's dojoAttachPoint syntax, but the domNode
property is the canonical "top level" node in widget UI.
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.
By default loadChildren is called when the items are fetched from the
store. This property allows delaying loadChildren (and the creation
of the options/menuitems) until the user opens the click the button.
dropdown
Parameter for children of dijit.layout.StackContainer or subclasses.
When true, display title of this widget as tab label etc., rather than just using
icon specified in iconClass
Deprecated. Parameter for children of dijit.layout.SplitContainer.
Minimum size (width or height) of a child of a SplitContainer.
The value is relative to other children's sizeShare properties.
Deprecated. Parameter for children of dijit.layout.SplitContainer.
Size (width or height) of a child of a SplitContainer.
The value is relative to other children's sizeShare properties.
For example, if there are two children and each has sizeShare=10, then
each takes up 50% of the available space.
Parameter for child of dijit.layout.BorderContainer where region != "center".
If true, enables user to resize the widget by putting a draggable splitter between
this widget and the region=center widget.
A store which, at the very least impelements dojo.data.api.Identity
to use for getting our list of options - rather than reading them
from the <option> html tags.
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.
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.