Changeset 13724
- Timestamp:
- 05/13/08 06:34:44 (2 months ago)
- Location:
- dijit/trunk
- Files:
-
- 1 added
- 1 modified
-
tests/tree/test_CustomLabel.html (added)
-
Tree.js (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
dijit/trunk/Tree.js
r13569 r13724 913 913 null, 914 914 { 915 // summary 915 // summary: 916 916 // Implements dijit.Tree.model connecting to a store with a single 917 917 // root item. Any methods passed into the constructor will override … … 925 925 // one ore more attributes that holds children of a tree node 926 926 childrenAttrs: ["children"], 927 928 // root: dojo.data.Item 927 928 // labelAttr: String 929 // If specified, get label for tree node from this attribute, rather 930 // than by calling store.getLabel() 931 labelAttr: "", 932 933 // root: dojo.data.Item 929 934 // Pointer to the root item (read only, not a parameter) 930 935 root: null, … … 1048 1053 getLabel: function(/*dojo.data.Item*/ item){ 1049 1054 // summary: get the label for an item 1050 return this.store.getLabel(item); // String 1055 if(this.labelAttr){ 1056 return this.store.getValue(item,this.labelAttr); // String 1057 }else{ 1058 return this.store.getLabel(item); // String 1059 } 1051 1060 }, 1052 1061