Update and send full xml serialized to server

Hi,
could someone help me. I’m trying to attach event on each update of xml tree but can’t find any.
I want to run special actions whenever any change (delete , change , add) is made on tree.
We have full licence I thought it’s going to help but can’t see anything.

Thank you!

It’s better to use DataProcessor extension to save changes from the Tree. Please find example here dhtmlx.com/docs/products/dht … _data.html

Thanks,
I saw that,
but I would like to have option to send full tree (can be even node by node).

AA

I would also like an answer to this question,the DataProcessor does not provide the desired functionality. I would like to output the entire serialized tree as an XML object, and send it back to the server for processing. We have a professional license, please advise.

Hello,

dataProcessor allows to send several items at once:

dp.setTransactionMode(“POST”,true)

Please have a look at the article - docs.dhtmlx.com/doku.php?id=dhtm … nfig_debug

However, it sends only modified items. If you want to send all items at once, you may

  • either send serialized tree to the server, please check the sample
    dhtmlxTree/samples/08_getting_tree_data/02_pro_user_data.html
  • or mark all items as updated to send them using dp:

[code]dp.setTransactionMode(“POST”,true);
dp.setUpdateMode(“off”);

function sendAllItems(){
var items = tree.getAllSubItems(0);
items = items.split(",");
for(var i=0; i< items.length; i++)
dp.setUpdated(items[i],true);
dp.sendData();
}[/code]

I want to run special actions whenever any change (delete , change , add) is made on tree.

delete and add operation can be initiated by calling corresponding method (deleteItem or insertNewItem ). So, you may call the necessary functionality right after these methods.

Editing can be catched by onEdit event:

docs.dhtmlx.com/doku.php?id=dhtm … ent_onedit

tree.attachEvent(“onEdit”, function(state,id,tree,value){
if(state==3){
/your code here/
}
return true;
});