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
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".
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.
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.
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
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.
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.
Processing after the DOM fragment is added to the document
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.
dojo.mixin((dojo.clone((dijit.layout.ContentPane.prototype.attributeMap)), {label : {node : "titleTextNode", type : "innerHTML", }, title : {node : "titleTextNode", type : "attribute", attribute : "title", }, iconClass : {node : "iconNode", type : "class", }, }))
Details
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 attr('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,
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.
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.
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.