Parameter | Type | Description |
---|---|---|
args | Object |
One or more attribute names (attributes in the dojo.data item) that specify that item's children
Setting this to true will cause the TreeStoreModel to defer calling loadItem on nodes until they are expanded. This allows for lazying loading where only one loadItem (and generally one network call, consequently) per expansion (rather than one for each child). This relies on partial loading of the children items; each children item of a fully loaded item should contain the label and info about having children.
If specified, get label for tree node from this attribute, rather than by calling store.getLabel()
Name of attribute in the Object passed to newItem() that specifies the id.
If newItemIdAttr is set then it's used when newItem() is called to see if an item with the same id already exists, and if so just links to the old item (so that the old item ends up with two parents).
Setting this to null or "" will make every drop create a new item.
Check if all children of the given item have been loaded
Parameter | Type | Description |
---|---|---|
parentItem | undefined |
Parameter | Type | Description |
---|---|---|
keywordArgs | object |
Parameter | Type | Description |
---|---|---|
parentItem | dojo.data.Item | |
onComplete | function(items, size) | |
onError | function | |
queryObj | object |
Calls onItem with the root item for the tree, possibly a fabricated item. Calls onError on error.
Parameter | Type | Description |
---|---|---|
onItem | undefined | |
onError | undefined |
Parameter | Type | Description |
---|---|---|
something | anything |
Parameter | Type | Description |
---|---|---|
item | dojo.data.Item |
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.
Parameter | Type | Description |
---|---|---|
args | dijit/tree/dndSource.__Item | |
parent | Item | |
insertIndex | int |
Optional
|
Move or copy an item from one parent item to another. Used in drag & drop
Parameter | Type | Description |
---|---|---|
childItem | Item | |
oldParentItem | Item | |
newParentItem | Item | |
bCopy | Boolean | |
insertIndex | int |
Optional
|
Called when item added to root of tree; user must override this method to modify the item so that it matches the query for top level items
Parameter | Type | Description |
---|---|---|
item | item |
store.setValue(item, "root", true);
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 | Description |
---|---|---|
item | dojo/data/Item |
store.setValue(item, "root", true);
Callback to do notifications about new, updated, or deleted items.
Parameter | Type | Description |
---|---|---|
parent | dojo/data/Item | |
newChildrenList | dojo/data/Item[] |
store.setValue(item, "root", true);
Callback when an item has been deleted.
Note that there will also be an onChildrenChange() callback for the parent of this item.
Parameter | Type | Description |
---|---|---|
item | dojo/data/Item |
store.setValue(item, "root", true);
Parameter | Type | Description |
---|---|---|
item | undefined |
store.setValue(item, "root", true);
Called when item removed from root of tree; user must override this method to modify the item so it doesn't match the query for top level items
Parameter | Type | Description |
---|---|---|
item | item |
store.unsetAttribute(item, "root");
Parameter | Type | Description |
---|---|---|
item | undefined | |
parentInfo | undefined |
store.unsetAttribute(item, "root");
User can override this method to modify a new element that's being added to the root of the tree, for example to add a flag like root=true
Parameter | Type | Description |
---|---|---|
args | dijit/tree/dndSource.__Item |
store.unsetAttribute(item, "root");
Updates the tree view according to changes to an item in the data store. Developers should override this method to be more efficient based on their app/data.
Handles updates to an item's children by calling onChildrenChange(), and other updates to an item by calling onChange().
Also, any change to any item re-executes the query for the tree's top-level items, since this modified item may have started/stopped matching the query for top level items.
If possible, developers should override this function to only call _requeryTop() when the change to the item has caused it to stop/start being a top level item in the tree.
Parameter | Type | Description |
---|---|---|
item | item | |
attribute | attribute-name-string | |
oldValue | Object | Array | |
newValue | Object | Array |
store.unsetAttribute(item, "root");