1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
this.store = new ibmtreedemo.AccountTreeStore({
data: data["treeStructure"],
cachedTransactionObjects: data["cachedTransactionObjects"],
cachedchildren: data["cachedchildren"]});
var myModel = new dijit.tree.ForestStoreModel({
store: this.store,
query:{type:'topLevelAccount'},
rootId: "accts",
rootLabel: 'data'});
this.tree = new dijit.Tree({
model: myModel,
onClick: function(item) {console.debug("item selection : "+myModel.store.getValue(item,"id"))
}
});
this.treeAttachPoint.appendChild(this.tree.domNode);
this.tree.startup(); |
Partager