Hi,
we are using dhtmlxtree (2.5) professional, dynamic loading. All but loadOpenStates works as expected. Here is our code:
// set up tree
this.tree = new dhtmlXTreeObject(treeBox,"100%","100%",0);
this.tree.setImagePath("modules/Categories/views/icons/tree/");
this.tree.enableSmartXMLParsing(true);
this.tree.enableCheckBoxes(0);
this.tree.enableDragAndDrop(true);
this.tree.enableItemEditor(true);
this.tree.setDragBehavior("complex");
this.tree.preventIECashing(true);
this.tree.enableThreeStateCheckboxes(false);
this.tree.setXMLAutoLoading(function(id) {
this.tree.loadXML('index.php?action=categories_get_tree&parent='+id+((archive) ? "&archive=true" : ""));
}.bind(this));
this.tree.setXMLAutoLoadingBehaviour("function");
this.tree.loadXML(autoLink,function(){
this.tree.loadOpenStates("updater_tree_open");
}.bind(this));
this.tree.setEditStartAction(false, false);
// when an item is selected
this.tree.attachEvent("onSelect",function () {
this.tree.saveSelectedItem("updater_tree_select");
$(document).fire("updater:unselect_tree",{tree:this.treeBoxId});
return true;
}.bind(this));
// after a tree node is opened
this.tree.attachEvent("onOpenEnd",function() {
this.tree.saveOpenStates("updater_tree_open");
return true;
}.bind(this));
The tree is encapsulated in a prototype-class. saveSelectedItem works and loads the right item, as well as saveOpenStates (cookie with right name and content is created). But loadOpenStates has no effect at all.
We are using Firefox 3.6.13 on Mac OSX 10.6 for testing.
Any suggestions?
Thanks
Daniel