Warning: Use of undefined constant Symbol - assumed 'Symbol' (this will throw an Error in a future version of PHP) in /mnt/new-ebs/workbench-106550/lib/dojo/util/docscripts/lib/parser2/dojo2.inc on line 215 Warning: Use of undefined constant JavaScriptSymbol - assumed 'JavaScriptSymbol' (this will throw an Error in a future version of PHP) in /mnt/new-ebs/workbench-106550/lib/dojo/util/docscripts/lib/parser2/dojo2.inc on line 215

dijit/tree/TreeStoreModel.js

  • Provides:

    • dijit.tree.TreeStoreModel
  • dijit.tree.TreeStoreModel

    • type
      Function
    • parameters:
      • args: (typeof Object)
    • summary
      Implements dijit.Tree.model connecting to a store with a single
      root item.  Any methods passed into the constructor will override
      the ones defined here.
    • tags:
    • example
      	{id:'ROOT'}
  • dijit.tree.TreeStoreModel.store

    • type
      dojo.data.Store
    • summary
      Underlying store
  • dijit.tree.TreeStoreModel.childrenAttrs

    • type
      String[]
    • summary
      One or more attribute names (attributes in the dojo.data item) that specify that item's children
  • dijit.tree.TreeStoreModel.newItemIdAttr

    • type
      String
    • summary
      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.
  • dijit.tree.TreeStoreModel.labelAttr

    • type
      String
    • summary
      If specified, get label for tree node from this attribute, rather
      than by calling store.getLabel()
  • dijit.tree.TreeStoreModel.root

    • tags: readonly
    • type
      dojo.data.Item
    • summary
      Pointer to the root item (read only, not a parameter)
  • dijit.tree.TreeStoreModel.query

    • type
      anything
    • summary
      Specifies datastore query to return the root item for the tree.
      Must only return a single item.   Alternately can just pass in pointer
      to root item.
  • dijit.tree.TreeStoreModel.deferItemLoadingUntilExpand

    • type
      Boolean
    • summary
      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.
  • dijit.tree.TreeStoreModel.constructor

    • constructor - constructor
    • type
      Function
    • parameters:
      • args: (typeof Object)
    • summary
      Passed the arguments listed above (store, etc)
    • tags:
  • dijit.tree.TreeStoreModel.destroy

    • type
      Function
  • dijit.tree.TreeStoreModel.getRoot

    • parameters:
      • onItem
      • onError
    • summary
      Calls onItem with the root item for the tree, possibly a fabricated item.
      Calls onError on error.
    • type
      Function
  • dijit.tree.TreeStoreModel.mayHaveChildren

    • parameters:
      • item: (typeof dojo.data.Item)
    • summary
      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)
    • type
      Function
  • dijit.tree.TreeStoreModel.getChildren

    • parameters:
      • parentItem: (typeof dojo.data.Item)
      • onComplete: (typeof function(items))
      • onError: (typeof function)
    • summary
      Calls onComplete() with array of child items of given parent item, all loaded.
    • type
      Function
  • dijit.tree.TreeStoreModel.isItem

    • parameters:
      • something: (typeof anything)
    • returns
      Boolean
    • type
      Function
  • dijit.tree.TreeStoreModel.fetchItemByIdentity

    • parameters:
      • keywordArgs: (typeof object)
    • type
      Function
  • dijit.tree.TreeStoreModel.getIdentity

    • parameters:
      • item: (typeof item)
    • returns
      Object
    • type
      Function
  • dijit.tree.TreeStoreModel.getLabel

    • parameters:
      • item: (typeof dojo.data.Item)
    • returns
      String
    • summary
      Get the label for an item
    • type
      Function
  • dijit.tree.TreeStoreModel.newItem

    • parameters:
      • args: (typeof dojo.dnd.Item)
      • parent: (typeof Item)
      • insertIndex: (typeof int)
    • summary
      Creates a new item.   See <code>dojo.data.api.Write</code> for details on args.
      Used in drag &amp; drop when item from external source dropped onto tree.
    • description
      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.
    • type
      Function
  • dijit.tree.TreeStoreModel.pasteItem

    • parameters:
      • childItem: (typeof Item)
      • oldParentItem: (typeof Item)
      • newParentItem: (typeof Item)
      • bCopy: (typeof Boolean)
      • insertIndex: (typeof int)
    • summary
      Move or copy an item from one parent item to another.
      Used in drag &amp; drop
    • type
      Function
  • dijit.tree.TreeStoreModel.onChange

    • parameters:
      • item: (typeof dojo.data.Item)
    • summary
      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.
    • tags: callback
    • type
      Function
  • dijit.tree.TreeStoreModel.onChildrenChange

    • parameters:
      • parent: (typeof dojo.data.Item)
      • newChildrenList: (typeof dojo.data.Item[])
    • summary
      Callback to do notifications about new, updated, or deleted items.
    • tags: callback
    • type
      Function
  • dijit.tree.TreeStoreModel.onDelete

    • parameters:
      • parent: (typeof dojo.data.Item)
      • newChildrenList: (typeof dojo.data.Item[])
    • summary
      Callback when an item has been deleted.
    • description
      Note that there will also be an onChildrenChange() callback for the parent
      of this item.
    • tags: callback
    • type
      Function
  • dijit.tree.TreeStoreModel.onNewItem

    • parameters:
      • item: (typeof dojo.data.Item)
      • parentInfo: (typeof Object)
    • summary
      Handler for when new items appear in the store, either from a drop operation
      or some other way.   Updates the tree view (if necessary).
    • description
      If the new item is a child of an existing item,
      calls onChildrenChange() with the new list of children
      for that existing item.
    • tags: extension
    • type
      Function
  • dijit.tree.TreeStoreModel.onDeleteItem

    • parameters:
      • item: (typeof Object)
    • summary
      Handler for delete notifications from underlying store
    • type
      Function
  • dijit.tree.TreeStoreModel.onSetItem

    • parameters:
      • item: (typeof item)
      • attribute: (typeof attribute-name-string)
      • oldValue: (typeof object)
        | array
      • newValue: (typeof object)
        | array
    • summary
      Updates the tree view according to changes in the data store.
    • description
      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.
    • tags: extension
    • type
      Function
  • dijit.tree.TreeStoreModel.connects

    • type
      Object
  • dijit.tree

    • type
      Object
  • dijit

    • type
      Object