|
|
|
_applyAttributes(
) :
void
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
|
|
|
|
_attrToDom(
attr
: String
value
: String
) :
void
Reflect a widget attribute (title, tabIndex, duration etc.) to
the widget DOM, as specified in attributeMap.
Also sets this["attr"] to the new value.
Note some attributes like "type"
cannot be processed this way as they are not mutable.
Parameter |
Type |
Usage |
Description |
attr |
String |
required |
|
value |
String |
required |
|
|
|
|
|
_collapseNode(
node
: _TreeNode
) :
void
Called when the user has requested to collapse the node
Parameter |
Type |
Usage |
Description |
node |
_TreeNode |
required |
|
|
|
|
|
_createTreeNode(
args
: Object
) :
void
creates a TreeNode
Developers can override this method to define their own TreeNode class;
However it will probably be removed in a future release in favor of a way
of just specifying a widget for the label, rather than one that contains
the children too.
Parameter |
Type |
Usage |
Description |
args |
Object |
required |
|
|
|
|
|
_expandNode(
node
: _TreeNode
recursive
: Boolean
) :
void
Called when the user has requested to expand the node
Parameter |
Type |
Usage |
Description |
node |
_TreeNode |
required |
|
recursive |
Boolean |
optional |
Internal flag used when _expandNode() calls itself, don't set. |
|
|
|
|
_getAttrNames(
name
) :
void
Helper function for Widget.attr().
Caches attribute name values so we don't do the string ops every time.
Parameter |
Type |
Usage |
Description |
name |
|
required |
|
|
|
|
|
_getFileList(
directory
) :
void
Parameter |
Type |
Usage |
Description |
directory |
|
required |
|
|
|
|
|
_getNextNode(
node
) :
void
Get next visible node
Parameter |
Type |
Usage |
Description |
node |
|
required |
|
|
|
|
|
_getNodeByDirectory(
directory
parentNode
) :
void
Parameter |
Type |
Usage |
Description |
directory |
|
required |
|
parentNode |
|
required |
|
|
|
|
|
_getPathAttr(
) :
void
Return an array of items that is the path to selected tree node.
|
|
|
|
_getRootOrFirstNode(
) :
void
|
|
|
|
_getSelectedItemAttr(
) :
void
Return item related to selected tree node.
|
|
|
|
_initState(
) :
void
Load in which nodes should be opened automatically
|
|
|
|
_load(
) :
void
Initial load of the tree.
Load root node (possibly hidden) and it's children.
|
|
|
|
_onBlur(
) :
void
This is where widgets do processing for when they stop being active,
such as changing CSS classes. See onBlur() for more details.
|
|
|
|
_onClick(
nodeWidget
: TreeNode
e
: Event
) :
void
Translates click events into commands for the controller to process
Parameter |
Type |
Usage |
Description |
nodeWidget |
TreeNode |
required |
|
e |
Event |
required |
|
|
|
|
|
_onConnect(
event
: String
) :
void
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".
Parameter |
Type |
Usage |
Description |
event |
String |
required |
|
|
|
|
|
_onDblClick(
nodeWidget
: TreeNode
e
: Event
) :
void
Translates double-click events into commands for the controller to process
Parameter |
Type |
Usage |
Description |
nodeWidget |
TreeNode |
required |
|
e |
Event |
required |
|
|
|
|
|
_onDownArrow(
message
: Object
) :
void
down arrow pressed; get next visible node, set focus there
Parameter |
Type |
Usage |
Description |
message |
Object |
required |
|
|
|
|
|
_onEndKey(
message
: Object
) :
void
End key pressed; go to last visible node.
Parameter |
Type |
Usage |
Description |
message |
Object |
required |
|
|
|
|
|
_onEnterKey(
message
: Object
evt
: Event
) :
void
Parameter |
Type |
Usage |
Description |
message |
Object |
required |
|
evt |
Event |
required |
|
|
|
|
|
_onExpandoClick(
message
: Object
) :
void
User clicked the +/- icon; expand or collapse my children.
Parameter |
Type |
Usage |
Description |
message |
Object |
required |
|
|
|
|
|
_onFocus(
e
) :
void
This is where widgets do processing for when they are active,
such as changing CSS classes. See onFocus() for more details.
Parameter |
Type |
Usage |
Description |
e |
|
required |
|
|
|
|
|
_onHomeKey(
) :
void
Home key pressed; get first visible node, and set focus there
|
|
|
|
_onItemChange(
item
: Item
) :
void
Processes notification of a change to an item's scalar values like label
Parameter |
Type |
Usage |
Description |
item |
Item |
required |
|
|
|
|
|
_onItemChildrenChange(
parent
: dojo.data.Item
newChildrenList
: dojo.data.Item[]
) :
void
Processes notification of a change to an item's children
Parameter |
Type |
Usage |
Description |
parent |
dojo.data.Item |
required |
|
newChildrenList |
dojo.data.Item[] |
required |
|
|
|
|
|
_onItemDelete(
item
: Item
) :
void
Processes notification of a deletion of an item
Parameter |
Type |
Usage |
Description |
item |
Item |
required |
|
|
|
|
|
_onKeyPress(
e
: Event
) :
void
Translates keypress events into commands for the controller
Parameter |
Type |
Usage |
Description |
e |
Event |
required |
|
|
|
|
|
_onLeftArrow(
message
: Object
) :
void
Left arrow pressed.
If not collapsed, collapse, else move to parent.
Parameter |
Type |
Usage |
Description |
message |
Object |
required |
|
|
|
|
|
_onLetterKeyNav(
message
: Object
) :
void
Called when user presses a prinatable key; search for node starting with recently typed letters.
Parameter |
Type |
Usage |
Description |
message |
Object |
required |
|
|
|
|
|
_onNodeFocus(
node
: dijit._Widget
) :
void
Called when a TreeNode gets focus, either by user clicking
it, or programatically by arrow key handling code.
It marks that the current node is the selected one, and the previously
selected node no longer is.
Parameter |
Type |
Usage |
Description |
node |
dijit._Widget |
required |
|
|
|
|
|
_onNodeMouseEnter(
node
: dijit._Widget
) :
void
Called when mouse is over a node (onmouseenter event)
Parameter |
Type |
Usage |
Description |
node |
dijit._Widget |
required |
|
|
|
|
|
_onNodeMouseLeave(
node
: dijit._Widget
) :
void
Called when mouse is over a node (onmouseenter event)
Parameter |
Type |
Usage |
Description |
node |
dijit._Widget |
required |
|
|
|
|
|
_onRightArrow(
message
: Object
) :
void
Right arrow pressed; go to child node
Parameter |
Type |
Usage |
Description |
message |
Object |
required |
|
|
|
|
|
_onShow(
) :
void
Internal method called when this widget is made visible.
See onShow for details.
|
|
|
|
_onUpArrow(
message
: Object
) :
void
Up arrow pressed; move to previous visible node
Parameter |
Type |
Usage |
Description |
message |
Object |
required |
|
|
|
|
|
_publish(
topicName
: String
message
: Object
) :
void
Publish a message for this widget/topic
Parameter |
Type |
Usage |
Description |
topicName |
String |
required |
|
message |
Object |
required |
|
|
|
|
|
_refreshNode(
node
: Object
) :
void
Refreshes the given node in the tree.
There's also a thread on dojo campus:
Parameter |
Type |
Usage |
Description |
node |
Object |
required |
|
Examples
|
|
|
|
_saveState(
) :
void
Create and save a cookie with the currently expanded nodes identifiers
|
|
|
|
_setClassAttr(
value
: String
) :
void
Custom setter for the CSS "class" attribute
Parameter |
Type |
Usage |
Description |
value |
String |
required |
|
|
|
|
|
_setPathAttr(
path
: Item[]
) :
void
Select the tree node identified by passed path.
Parameter |
Type |
Usage |
Description |
path |
Item[] |
required |
Array of items or item id's |
|
|
|
|
_setSelectedItemAttr(
item
: dojo.data.Item
) :
void
Select a tree node related to passed item.
Parameter |
Type |
Usage |
Description |
item |
dojo.data.Item |
required |
or id |
|
|
|
|
_setStyleAttr(
value
: String||Object
) :
void
Sets the style attribut of the widget according to value,
Determines which node to set the style on based on style setting
in attributeMap.
Parameter |
Type |
Usage |
Description |
value |
String||Object |
required |
|
|
|
|
|
_state(
item
expanded
) :
void
Query or set expanded state for an item,
Parameter |
Type |
Usage |
Description |
item |
|
required |
|
expanded |
|
required |
|
|
|
|
|
_store2model(
) :
void
User specified a store&query rather than model, so create model from store/query
|
|
|
|
attr(
name
: String|Object
value
: Object
) :
void
Set or get properties on a widget instance.
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. |
|
|
|
|
blurNode(
) :
void
|
|
|
|
buildRendering(
) :
void
Construct the UI for this widget, setting this.domNode
Most widgets will mixin `dijit._Templated`, which implements this
method.
|
|
|
|
checkAcceptance(
source
: dijit.tree._dndSource
nodes
: DOMNode[]
) :
void
Checks if the Tree itself can accept nodes from this source
Parameter |
Type |
Usage |
Description |
source |
dijit.tree._dndSource |
required |
The source which provides items |
nodes |
DOMNode[] |
required |
Array of DOM nodes corresponding to nodes being dropped, dijitTreeRow nodes if
source is a dijit.Tree. |
|
|
|
|
checkItemAcceptance(
target
: DOMNode
source
: dijit.tree.dndSource
position
: String
) :
void
Stub function to be overridden if one wants to check for the ability to drop at the node/item level
In the base case, this is called to check if target can become a child of source.
When betweenThreshold is set, position="before" or "after" means that we
are asking if the source node can be dropped before/after the target node.
Parameter |
Type |
Usage |
Description |
target |
DOMNode |
required |
The dijitTreeRoot DOM node inside of the TreeNode that we are dropping on to
Use dijit.getEnclosingWidget(target) to get the TreeNode. |
source |
dijit.tree.dndSource |
required |
The (set of) nodes we are dropping |
position |
String |
required |
"over", "before", or "after" |
|
|
|
|
connect(
obj
: Object|null
event
: String|Function
method
: String|Function
) :
void
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
Parameter |
Type |
Usage |
Description |
obj |
Object|null |
required |
|
event |
String|Function |
required |
|
method |
String|Function |
required |
|
Examples
|
|
|
|
create(
params
: Object
srcNodeRef
: DomNode|String
) :
void
Kick off the life-cycle of a widget
Create calls a number of widget methods (postMixInProperties, buildRendering, postCreate,
Parameter |
Type |
Usage |
Description |
params |
Object |
optional |
Hash of initialization parameters for widget, including
scalar values (like title, duration etc.) and functions,
typically callbacks like onClick. |
srcNodeRef |
DomNode|String |
optional |
|
|
|
|
|
createDirectory(
name
) :
void
Parameter |
Type |
Usage |
Description |
name |
|
required |
|
|
|
|
|
deleteDirectory(
directory
) :
void
delete given or current directory
Parameter |
Type |
Usage |
Description |
directory |
|
required |
|
|
|
|
|
deleteFiles(
selectedNodes
) :
void
delete specified (or selected) files
Parameter |
Type |
Usage |
Description |
selectedNodes |
|
required |
|
|
|
|
|
destroy(
) :
void
Destroy this widget, but not its descendants.
This method will, however, destroy internal widgets such as those used within a template.
|
|
|
|
destroyDescendants(
preserveDom
: Boolean
) :
void
Recursively destroy the children of this widget and their
descendants.
Parameter |
Type |
Usage |
Description |
preserveDom |
Boolean |
optional |
If true, the preserveDom attribute is passed to all descendant
widget's .destroy() method. Not for use with _Templated
widgets. |
|
|
|
|
destroyRecursive(
) :
void
Destroy this widget and its 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 is removed from the manager object.
|
|
|
|
destroyRendering(
preserveDom
: Boolean
) :
void
Destroys the DOM nodes associated with this widget
Parameter |
Type |
Usage |
Description |
preserveDom |
Boolean |
optional |
If true, this method will leave the original DOM structure alone |
|
|
|
|
disconnect(
handles
: _Widget.Handle
) :
void
Disconnects handle created by connect .
Also removes handle from this widget's list of connects.
Parameter |
Type |
Usage |
Description |
handles |
_Widget.Handle |
required |
|
|
|
|
|
focusNode(
node
) :
void
Focus on the specified node (which must be visible)
Parameter |
Type |
Usage |
Description |
node |
|
required |
|
|
|
|
|
getChildren(
) :
void
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.
|
|
|
|
getCurrentDirectory(
) :
void
|
|
|
|
getCurrentDirectoryName(
) :
void
|
|
|
|
getDescendants(
) :
void
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.
|
|
|
|
getIconClass(
item
: dojo.data.Item
opened
: Boolean
) :
void
Overridable function to return CSS class name to display icon
Parameter |
Type |
Usage |
Description |
item |
dojo.data.Item |
required |
|
opened |
Boolean |
required |
|
|
|
|
|
getIconStyle(
item
: dojo.data.Item
opened
: Boolean
) :
void
Overridable function to return CSS styles to display icon
Parameter |
Type |
Usage |
Description |
item |
dojo.data.Item |
required |
|
opened |
Boolean |
required |
|
|
|
|
|
getItemChildren(
parentItem
: dojo.data.Item
onComplete
: function(items)
) :
void
Deprecated. This should be specified on the model itself.
Overridable function that return array of child items of given parent item,
or if parentItem==null then return top items in tree
Parameter |
Type |
Usage |
Description |
parentItem |
dojo.data.Item |
required |
|
onComplete |
function(items) |
required |
|
|
|
|
|
getLabel(
item
: dojo.data.Item
) :
void
Overridable function to get the label for a tree node (given the item)
Parameter |
Type |
Usage |
Description |
item |
dojo.data.Item |
required |
|
|
|
|
|
getLabelClass(
item
: dojo.data.Item
) :
void
user overridable function to return CSS class name to display label
if no return value is set dojo adds a class "undefined" to every label in the tree
Parameter |
Type |
Usage |
Description |
item |
dojo.data.Item |
required |
|
|
|
|
|
getLabelStyle(
item
: dojo.data.Item
opened
: Boolean
) :
void
Overridable function to return CSS styles to display label
Parameter |
Type |
Usage |
Description |
item |
dojo.data.Item |
required |
|
opened |
Boolean |
required |
|
|
|
|
|
getLastSelectedNode(
) :
void
|
|
|
|
getNodesByItem(
item
: dojo.data.Item
) :
void
Returns all tree nodes that refer to an item
Parameter |
Type |
Usage |
Description |
item |
dojo.data.Item |
required |
or id |
|
|
|
|
getRowClass(
item
: dojo.data.Item
opened
: Boolean
) :
void
Overridable function to return CSS class name to display row
Parameter |
Type |
Usage |
Description |
item |
dojo.data.Item |
required |
|
opened |
Boolean |
required |
|
|
|
|
|
getRowStyle(
item
: dojo.data.Item
opened
: Boolean
) :
void
Overridable function to return CSS styles to display row
Parameter |
Type |
Usage |
Description |
item |
dojo.data.Item |
required |
|
opened |
Boolean |
required |
|
|
|
|
|
getTooltip(
item
: dojo.data.Item
) :
void
Overridable function to get the tooltip for a tree node (given the item)
Parameter |
Type |
Usage |
Description |
item |
dojo.data.Item |
required |
|
|
|
|
|
isFocusable(
) :
void
Return true if this widget can currently be focused
and false if not
|
|
|
|
isLeftToRight(
) :
void
Checks the page for text direction
|
|
|
|
itemCreator(
nodes
: DomNode[]
target
: DomNode
source
: dojo.dnd.Source
) :
void
Returns objects passed to Tree.model.newItem() based on DnD nodes
dropped onto the tree. Developer must override this method to enable
dropping from external sources onto this Tree, unless the Tree.model's items
For each node in nodes[], which came from source, create a hash of name/value
pairs to be passed to Tree.model.newItem(). Returns array of those hashes.
Parameter |
Type |
Usage |
Description |
nodes |
DomNode[] |
required |
The DOMNodes dragged from the source container |
target |
DomNode |
required |
The target TreeNode.rowNode |
source |
dojo.dnd.Source |
required |
The source container the nodes were dragged from, perhaps another Tree or a plain dojo.dnd.Source |
|
|
|
|
mayHaveChildren(
item
: dojo.data.Item
) :
void
Deprecated. This should be specified on the model itself.
Overridable function to tell if an item has or may have children.
Controls whether or not +/- expando icon is shown.
(For efficiency reasons we may not want to check if an element actually
has children until user clicks the expando node)
Parameter |
Type |
Usage |
Description |
item |
dojo.data.Item |
required |
|
|
|
|
|
onBlur(
) :
void
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.
|
|
|
|
onClick(
item
node
) :
void
Callback when a tree node is clicked
Parameter |
Type |
Usage |
Description |
item |
|
required |
|
node |
|
required |
|
|
|
|
|
onClose(
item
: dojo.data
node
: TreeNode
) :
void
Callback when a node is closed
Parameter |
Type |
Usage |
Description |
item |
dojo.data |
required |
|
node |
TreeNode |
required |
|
|
|
|
|
onDblClick(
item
: dojo.data
node
: TreeNode
evt
: Event
) :
void
Callback when a tree node is double-clicked
Parameter |
Type |
Usage |
Description |
item |
dojo.data |
required |
|
node |
TreeNode |
required |
|
evt |
Event |
required |
|
|
|
|
|
onDndCancel(
) :
void
Parameter to dndController, see dijit.tree.dndSource.onDndCancel .
Generally this doesn't need to be set.
|
|
|
|
onDndDrop(
) :
void
Parameter to dndController, see dijit.tree.dndSource.onDndDrop .
Generally this doesn't need to be set.
|
|
|
|
onFocus(
) :
void
Called when the widget becomes "active" because
it or a widget inside of it either has focus, or has recently
been clicked.
|
|
|
|
onHide(
) :
void
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 .
|
|
|
|
onKeyDown(
event
: key
) :
void
Connect to this function to receive notifications of keys being pressed down.
Parameter |
Type |
Usage |
Description |
event |
key |
required |
Event |
|
|
|
|
onKeyPress(
event
: key
) :
void
Connect to this function to receive notifications of printable keys being typed.
Parameter |
Type |
Usage |
Description |
event |
key |
required |
Event |
|
|
|
|
onKeyUp(
event
: key
) :
void
Connect to this function to receive notifications of keys being released.
Parameter |
Type |
Usage |
Description |
event |
key |
required |
Event |
|
|
|
|
onLoad(
) :
void
Called when tree finishes loading and expanding.
If persist == true the loading may encompass many levels of fetches
from the data store, each asynchronous. Waits for all to finish.
|
|
|
|
onMouseDown(
event
: mouse
) :
void
Connect to this function to receive notifications of when the mouse button is pressed down.
Parameter |
Type |
Usage |
Description |
event |
mouse |
required |
Event |
|
|
|
|
onMouseEnter(
event
: mouse
) :
void
Connect to this function to receive notifications of when the mouse moves onto this widget.
Parameter |
Type |
Usage |
Description |
event |
mouse |
required |
Event |
|
|
|
|
onMouseLeave(
event
: mouse
) :
void
Connect to this function to receive notifications of when the mouse moves off of this widget.
Parameter |
Type |
Usage |
Description |
event |
mouse |
required |
Event |
|
|
|
|
onMouseMove(
event
: mouse
) :
void
Connect to this function to receive notifications of when the mouse moves over nodes contained within this widget.
Parameter |
Type |
Usage |
Description |
event |
mouse |
required |
Event |
|
|
|
|
onMouseOut(
event
: mouse
) :
void
Connect to this function to receive notifications of when the mouse moves off of nodes contained within this widget.
Parameter |
Type |
Usage |
Description |
event |
mouse |
required |
Event |
|
|
|
|
onMouseOver(
event
: mouse
) :
void
Connect to this function to receive notifications of when the mouse moves onto nodes contained within this widget.
Parameter |
Type |
Usage |
Description |
event |
mouse |
required |
Event |
|
|
|
|
onMouseUp(
event
: mouse
) :
void
Connect to this function to receive notifications of when the mouse button is released.
Parameter |
Type |
Usage |
Description |
event |
mouse |
required |
Event |
|
|
|
|
onOpen(
item
: dojo.data
node
: TreeNode
) :
void
Callback when a node is opened
Parameter |
Type |
Usage |
Description |
item |
dojo.data |
required |
|
node |
TreeNode |
required |
|
|
|
|
|
onShow(
) :
void
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 .
|
|
|
|
openNode(
directory
) :
void
Parameter |
Type |
Usage |
Description |
directory |
|
required |
|
|
|
|
|
placeAt(
reference
: String|DomNode|_Widget
position
: String|Int
) :
void
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 |
Examples
|
|
|
|
postCreate(
) :
void
Processing after the DOM fragment is created
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.
|
|
|
|
postMixInProperties(
) :
void
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.
|
|
|
|
postscript(
params
: Object
srcNodeRef
: DomNode|String
) :
void
Kicks off widget instantiation. See create() for details.
Parameter |
Type |
Usage |
Description |
params |
Object |
optional |
|
srcNodeRef |
DomNode|String |
required |
|
|
|
|
|
reloadFiles(
) :
void
|
|
|
|
renameDirectory(
name
) :
void
Parameter |
Type |
Usage |
Description |
name |
|
required |
|
|
|
|
|
resize(
changeSize
) :
void
Parameter |
Type |
Usage |
Description |
changeSize |
|
required |
|
|
|
|
|
selectDirectory(
directory
) :
void
Parameter |
Type |
Usage |
Description |
directory |
|
required |
|
|
|
|
|
setAttribute(
attr
: String
value
: anything
) :
void
Deprecated. Use attr() instead.
Parameter |
Type |
Usage |
Description |
attr |
String |
required |
|
value |
anything |
required |
|
|
|
|
|
setLabelNode(
node
label
) :
void
Parameter |
Type |
Usage |
Description |
node |
|
required |
|
label |
|
required |
|
|
|
|
|
startup(
) :
void
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.
|
|
|
|
subscribe(
topic
: String
method
: String|Function
) :
void
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.
Parameter |
Type |
Usage |
Description |
topic |
String |
required |
|
method |
String|Function |
required |
|
Examples
|
|
|
|
toString(
) :
void
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 reversible
serialization.
|
|
|
|
uninitialize(
) :
void
Stub function. Override to implement custom widget tear-down
behavior.
|
|
|
|
unsubscribe(
handle
: Object
) :
void
Unsubscribes handle created by this.subscribe.
Also removes handle from this widget's list of subscriptions
Parameter |
Type |
Usage |
Description |
handle |
Object |
required |
|
|
|
|
|
_attrPairNames : shared
Initial value{}
Detailsbetween all widgets
|
|
|
|
_beingDestroyed : Object
|
|
|
|
_blankGif : String
DetailsPath to a blank 1x1 image.
Used by <img> nodes in templates that really get their image via CSS background-image.
|
|
|
|
_connects : Array
|
|
|
|
_created : Object
|
|
|
|
_currentDirectory : Object
|
|
|
|
_curSearch : Object
|
|
|
|
_deferredConnects : Object
Initial value{onClick : "", onDblClick : "", onKeyDown : "", onKeyPress : "", onKeyUp : "", onMouseMove : "", onMouseDown : "", onMouseOut : "", onMouseOver : "", onMouseLeave : "", onMouseEnter : "", onMouseUp : "", }
DetailsattributeMap addendum for event handlers that should be connected only on first use
|
|
|
|
_destroyed : Object
|
|
|
|
_itemNodesMap : Object
|
|
|
|
_keyHandlerMap :
|
|
|
|
_lastSelectedNode : Object
|
|
|
|
_loadDeferred : Object
|
|
|
|
_nodePixelIndent : Integer
Initial value19
DetailsNumber of pixels to indent tree nodes (relative to parent node).
Default is 19 but can be overridden by setting CSS class dijitTreeIndent
and calling resize() or startup() on tree after it's in the DOM.
|
|
|
|
_openedItemIds : Object
|
|
|
|
_started : Boolean
Detailsstartup() has completed.
|
|
|
|
_subscribes : Array
|
|
|
|
_v10Compat : Object
|
|
|
|
attributeMap : Object
Initial value{id : "", dir : "", lang : "", class : "", style : "", title : "", }
DetailsattributeMap 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,
|
|
|
|
autoExpand : Boolean
DetailsFully expand the tree on load. Overrides persist
|
|
|
|
betweenThreshold : Integer
DetailsSet to a positive value to allow drag and drop "between" nodes.
If during DnD mouse is over a (target) node but less than betweenThreshold
pixels from the bottom edge, dropping the the dragged node will make it
the next sibling of the target node, rather than the child.
Similarly, if mouse is over a target node but less that betweenThreshold
pixels from the top edge, dropping the dragged node will make it
the target node's previous sibling rather than the target node's child.
|
|
|
|
childrenAttr : String[]
Initial value["children"]
DetailsDeprecated. This information should be specified in the model.
One ore more attributes that holds children of a tree node
|
|
|
|
class : String
DetailsHTML class attribute
|
|
|
|
closable : Boolean
DetailsParameter 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.
|
|
|
|
containerNode : DomNode
Initial valuenull
DetailsDesignates where children of the source DOM node will be placed.
"Children" in this case refers to both DOM nodes and widgets.
|
|
|
|
cookieName : String
|
|
|
|
dir : String
DetailsUnsupported by Dijit, but here for completeness. Dijit only supports setting text direction on the
entire document.
|
|
|
|
directory : String
Initial valueMediaGallery
|
|
|
|
dndController : String
Initial valuenull
DetailsClass name to use as as the dnd controller. Specifying this class enables DnD.
Generally you should specify this as "dijit.tree.dndSource".
|
|
|
|
dndParams : Array
Initial value["onDndDrop", "itemCreator", "onDndCancel", "checkAcceptance", "checkItemAcceptance", "dragThreshold", "betweenThreshold"]
|
|
|
|
dojoAttachEvent : String
|
|
|
|
dojoAttachPoint : String
|
|
|
|
domNode : DomNode
Initial valuenull
DetailsThis 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.
|
|
|
|
dragThreshold : Integer
Initial value5
DetailsNumber of pixels mouse moves before it's considered the start of a drag operation
|
|
|
|
iconClass : String
DetailsParameter for children of dijit.layout.StackContainer or subclasses.
CSS Class specifying icon to use in label associated with this pane.
|
|
|
|
id : String
DetailsA 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.
|
|
|
|
label : String
Initial valueFiles
DetailsDeprecated. Use dijit.tree.ForestStoreModel directly instead.
Used in conjunction with query parameter.
If a query is specified (rather than a root node id), and a label is also specified,
then a fake root node is created and displayed, with this label.
|
|
|
|
lang : String
DetailsRarely used. Overrides the default Dojo locale used to render this widget,
|
|
|
|
lastFocused : Object
|
|
|
|
layoutAlign : String
Details"none", "left", "right", "bottom", "top", and "client".
See the LayoutContainer description for details on this parameter.
|
|
|
|
listId : String
|
|
|
|
maxSize : Number
DetailsParameter for children of dijit.layout.BorderContainer .
Specifies a maximum size (in pixels) for this widget when resized by a splitter.
|
|
|
|
minSize : Number
DetailsParameter for children of dijit.layout.BorderContainer .
Specifies a minimum size (in pixels) for this widget when resized by a splitter.
|
|
|
|
model : dijit.Tree.model
Initial valuenull
DetailsInterface to read tree data, get notifications of changes to tree data,
and for handling drop operations (i.e drag and drop onto the tree)
|
|
|
|
multiCharSearchDuration : Number
Initial value250
DetailsIf multiple characters are typed where each keystroke happens within
multiCharSearchDuration of the previous keystroke,
search for nodes matching all the keystrokes.
For example, typing "ab" will search for entries starting with
"ab" unless the delay between "a" and "b" is greater than multiCharSearchDuration.
|
|
|
|
nodesWithKeyClick : String[]
Initial value["input", "button"]
DetailsList of nodes that correctly handle click events via native browser support,
and don't need dijit's help
|
|
|
|
openOnClick : Boolean
DetailsIf true, clicking a folder node's label will open it, rather than calling onClick()
|
|
|
|
openOnDblClick : Boolean
DetailsIf true, double-clicking a folder node's label will open it, rather than calling onDblClick()
|
|
|
|
params :
|
|
|
|
path : String[]
Initial value[]
Detailsor Item[]
Full path from rootNode to selected node expressed as array of items or array of ids.
|
|
|
|
persist : bool
DetailsEnables/disables use of cookies for state saving.
|
|
|
|
query : anything
Initial valuenull
DetailsDeprecated. User should specify query to the model directly instead.
Specifies datastore query to return the root item or top items for the tree.
|
|
|
|
region : String
DetailsParameter for children of dijit.layout.BorderContainer .
|
|
|
|
rootNode : Object
|
|
|
|
selected : Boolean
DetailsParameter for children of dijit.layout.StackContainer or subclasses.
Specifies that this widget should be the initially displayed pane.
|
|
|
|
selectedItem : Item
Initial valuenull
DetailsThe currently selected item in this tree.
This property can only be set (via attr('selectedItem', ...)) when that item is already
visible in the tree. (I.e. the tree has already been expanded to show that node.)
Should generally use path attribute to set the selected item instead.
|
|
|
|
showRoot : Boolean
DetailsShould the root node be displayed, or hidden?
|
|
|
|
showTitle : Boolean
DetailsParameter 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
|
|
|
|
sizeMin : Integer
DetailsDeprecated. 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.
|
|
|
|
sizeShare : Integer
DetailsDeprecated. 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.
|
|
|
|
splitter : Boolean
DetailsParameter 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.
|
|
|
|
srcNodeRef : DomNode
Initial valuenull
Detailspointer to original DOM node
|
|
|
|
store : String||dojo.data.Store
Initial valuenull
DetailsDeprecated. Use "model" parameter instead.
The store to get data to display in the tree.
|
|
|
|
style : String||Object
DetailsHTML style attributes as cssText string or name/value hash
|
|
|
|
templateString : Object
Initial valuedojo.cache(("dijit", "templates/Tree.html"))
|
|
|
|
title : String
DetailsHTML 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 : String
DetailsWhen 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.
|
|
|
|
tree : Object
|
|
|
|
url : String
|
|
|
|
viewAction : String
Initial valueJSONViewResponse
|
|
|
|
waiRole : String
|
|
|
|
waiState : String
|