Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Jean on Apr 03, 2008 10:13
open dhtmlx forum
DHTMLXTree - Serialization

Hi,

It seems tree sierialization need a javascript extension library to be imported but nothing is mentioned in the documentation.

Regards,
Jean.
Answer posted by Support on Apr 04, 2008 01:17
Actually, serialization requires the dhtmlxtree_xw.js extension. serializeTree  is  professional version method.

But such an information is defined in the documentation http://www.dhtmlx.com/docs/products/dhtmlxTree/doc/alpha.html:

serializeTree() [Professional]
return xml description of tree
Object: dhtmlXTreeObject
Topic(s):
File required:dhtmlxtree_xw.js
Answer posted by Jean on Apr 04, 2008 01:36

Hi,

In fact I was looking in the doc explorer : http://www.dhtmlx.com/docs/products/docsExplorer/index.shtml?node=dhtmlxtree

Thanks,
Jean.

 

 

Answer posted on Apr 04, 2008 01:47

Hi,

Then I have another question: Can you do something like this ?

      myTree.setSerializationLevel(false, true);
      var contextTreeXml = myTree.serializeTree();
      myTree.deleteChildItems(0);
      myTree.loadXMLString(contextTreeXml);

Regards,
Jean.

Answer posted by Support on Apr 04, 2008 02:38
Yes, this is correct logic, the serialized XML can be used for tree initialization ( actually theme switching on main tree page at dhtmlx.com done in such way )