|
|
|
constructor(
args
: Object
) :
void
Passed the arguments listed above (store, etc)
Parameter |
Type |
Usage |
Description |
args |
Object |
required |
|
|
|
|
|
destroy(
) :
void
|
|
|
|
fetchItemByIdentity(
keywordArgs
: object
) :
void
Parameter |
Type |
Usage |
Description |
keywordArgs |
object |
required |
|
|
|
|
|
getChildren(
parentItem
: dojo.data.Item
onComplete
: function(items)
onError
: function
) :
void
Calls onComplete() with array of child items of given parent item, all loaded.
Parameter |
Type |
Usage |
Description |
parentItem |
dojo.data.Item |
required |
|
onComplete |
function(items) |
required |
|
onError |
function |
required |
|
|
|
|
|
getIdentity(
item
: item
) :
void
Parameter |
Type |
Usage |
Description |
item |
item |
required |
|
|
|
|
|
getLabel(
item
: dojo.data.Item
) :
void
Get the label for an item
Parameter |
Type |
Usage |
Description |
item |
dojo.data.Item |
required |
|
|
|
|
|
getRoot(
onItem
onError
) :
void
Calls onItem with the root item for the tree, possibly a fabricated item.
Calls onError on error.
Parameter |
Type |
Usage |
Description |
onItem |
|
required |
|
onError |
|
required |
|
|
|
|
|
isItem(
something
: anything
) :
void
Parameter |
Type |
Usage |
Description |
something |
anything |
required |
|
|
|
|
|
mayHaveChildren(
item
: dojo.data.Item
) :
void
Tells if an item has or may have children. Implementing logic here
avoids showing +/- expando icon for nodes that we know don't have children.
(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 |
|
|
|
|
|
newItem(
args
: dojo.dnd.Item
parent
: Item
insertIndex
: int
) :
void
Creates a new item. See dojo.data.api.Write for details on args.
Used in drag & drop when item from external source dropped onto tree.
Developers will need to override this method if new items get added
to parents with multiple children attributes, in order to define which
children attribute points to the new item.
Parameter |
Type |
Usage |
Description |
args |
dojo.dnd.Item |
required |
|
parent |
Item |
required |
|
insertIndex |
int |
optional |
|
|
|
|
|
onChange(
item
: dojo.data.Item
) :
void
Callback whenever an item has changed, so that Tree
can update the label, icon, etc. Note that changes
to an item's children or parent(s) will trigger an
onChildrenChange() so you can ignore those changes here.
Parameter |
Type |
Usage |
Description |
item |
dojo.data.Item |
required |
|
|
|
|
|
onChildrenChange(
parent
: dojo.data.Item
newChildrenList
: dojo.data.Item[]
) :
void
Callback to do notifications about new, updated, or deleted items.
Parameter |
Type |
Usage |
Description |
parent |
dojo.data.Item |
required |
|
newChildrenList |
dojo.data.Item[] |
required |
|
|
|
|
|
onDelete(
parent
: dojo.data.Item
newChildrenList
: dojo.data.Item[]
) :
void
Callback when an item has been deleted.
Note that there will also be an onChildrenChange() callback for the parent
of this item.
Parameter |
Type |
Usage |
Description |
parent |
dojo.data.Item |
required |
|
newChildrenList |
dojo.data.Item[] |
required |
|
|
|
|
|
onDeleteItem(
item
: Object
) :
void
Handler for delete notifications from underlying store
Parameter |
Type |
Usage |
Description |
item |
Object |
required |
|
|
|
|
|
onNewItem(
item
: dojo.data.Item
parentInfo
: Object
) :
void
Handler for when new items appear in the store, either from a drop operation
or some other way. Updates the tree view (if necessary).
If the new item is a child of an existing item,
calls onChildrenChange() with the new list of children
for that existing item.
Parameter |
Type |
Usage |
Description |
item |
dojo.data.Item |
required |
|
parentInfo |
Object |
required |
|
|
|
|
|
onSetItem(
item
: item
attribute
: attribute-name-string
oldValue
: object
newValue
: object
) :
void
Updates the tree view according to changes in the data store.
Handles updates to an item's children by calling onChildrenChange(), and
other updates to an item by calling onChange().
See `onNewItem` for more details on handling updates to an item's children.
Parameter |
Type |
Usage |
Description |
item |
item |
required |
|
attribute |
attribute-name-string |
required |
|
oldValue |
object |
required |
| array |
newValue |
object |
required |
| array |
|
|
|
|
pasteItem(
childItem
: Item
oldParentItem
: Item
newParentItem
: Item
bCopy
: Boolean
insertIndex
: int
) :
void
Move or copy an item from one parent item to another.
Used in drag & drop
Parameter |
Type |
Usage |
Description |
childItem |
Item |
required |
|
oldParentItem |
Item |
required |
|
newParentItem |
Item |
required |
|
bCopy |
Boolean |
required |
|
insertIndex |
int |
optional |
|
|