Only private and/or inherited functions are available.
Set or get properties on a widget instance.
Construct the UI for this widget, setting this.domNode. Most
widgets will mixin dijit._Templated, which implements this
method.
Revert to display mode, discarding any changes made in the editor
Connects specified obj/event to specified method of this object
and registers for disconnect() on widget destroy.
Kick off the life-cycle of a widget
Destroy this widget, but not its descendants.
Will, however, destroy internal widgets such as those used within a template.
Recursively destroy the children of this widget and their
descendants.
Destroy this widget and it's descendants. This is the generic
"destructor" function that all widget users should call to
cleanly discard with a widget. Once a widget is destroyed, it's
removed from the manager object.
Destroys the DOM nodes associated with this widget
Disconnects handle created by this.connect.
Also removes handle from this widget's list of connects
Display the editor widget in place of the original (read only) markup.
Returns all the widgets contained by this, i.e., all widgets underneath this.containerNode.
Return true if this widget can currently be focused
and false if not
Checks the page for text direction
stub function. Override or connect to this method to receive
notifications for when the widget moves out of focus.
User should set this handler to be notified when no change occured
User should set this handler to be notified of changes to value
Connect to this function to receive notifications of mouse click events.
Callback if someone tries to close the child, child will be closed if func returns true
Connect to this function to receive notifications of mouse double click events.
stub function. Override or connect to this method to receive
notifications for when the widget moves into focus.
Connect to this function to receive notifications of keys being pressed down.
Connect to this function to receive notifications of printable keys being typed.
Connect to this function to receive notifications of keys being released.
Connect to this function to receive notifications of when the mouse button is pressed down.
Connect to this function to receive notifications of when the mouse moves onto this widget.
Connect to this function to receive notifications of when the mouse moves off of this widget.
Connect to this function to receive notifications of when the mouse moves over nodes contained within this widget.
Connect to this function to receive notifications of when the mouse moves off of nodes contained within this widget.
Connect to this function to receive notifications of when the mouse moves onto nodes contained within this widget.
Connect to this function to receive notifications of when the mouse button is released.
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.
Called after a widget's dom has been setup
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.
kicks off widget instantiation, see create() for details.
Save the contents of the editor and revert to display mode.
Called after a widget's children, and other widgets on the page, have been created.
Provides an opportunity to manipulate any children before they are displayed.
This is useful for composite widgets that need to control or layout sub-widgets.
Many layout widgets can use this as a wiring phase.
returns a string that represents the widget. 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 reversable
serialization.
stub function. Override to implement custom widget tear-down
behavior.
Step during widget creation to copy all widget attributes to the
DOM as per attributeMap and _setXXXAttr functions.
Reflect a widget attribute (title, tabIndex, duration etc.) to
the widget DOM, as specified in attributeMap.
helper function for Widget.attr()
cache attribute name values so we don't do the string ops every time
Search subtree under root, putting found widgets in outAry
Called when someone connects to one of my handlers.
"Turn on" that handler if it isn't active yet.
Hook to make attr("disabled", ...) work.
Set disabled state of widget.
Hook to make attr("value", ...) work.
Inserts specified HTML value into this node, or an "input needed" character if node is blank.
revert to display mode, and optionally focus on display node
Only private and/or inherited properties are available.
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,
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 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" }
Changing the value automatically saves it; don't have to push save button
(and save button isn't even displayed)
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 dojoType=myWidget>
<b> here's a plain dom node
<span dojoType=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 dojoType=subWidget>and a widget</span>
<i> and another plain dom node </i>
In templated widgets, "containerNode" is set via a
dojoAttachPoint 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.
Unsupported by Dijit, but here for completeness. Dijit only supports setting text direction on the
entire document.
Bi-directional support, as defined by the [HTML DIR](http://www.w3.org/TR/html401/struct/dirlang.html#adef-dir)
attribute. Either left-to-right "ltr" or right-to-left "rtl".
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.
Class name for Editor widget
Set of parameters for editor, like {required: true}
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.
Rarely used. Overrides the default Dojo locale used to render this widget,
as defined by the [HTML LANG](http://www.w3.org/TR/html401/struct/dirlang.html#adef-lang) attribute.
Value must be among the list of locales specified during by the Dojo bootstrap,
formatted according to [RFC 3066](http://www.ietf.org/rfc/rfc3066.txt) (like en-us).
The text that gets displayed when there is no value (so that the user has a place to click to edit)
Set this to true if the specified Editor's value should be interpreted as HTML
rather than plain text (ie, dijit.Editor)
pointer to original dom node
The display value of the widget in read-only mode
Width of editor. By default it's width=100% (ie, block mode)
attributeMap addendum for event handlers that should be connected only on first use