dhtmlxTree sending UserData using dataprocessor


In a post elsewhere it is stated “Userdata values are sent to the server with the other data of changed item.”

I’m trying to access the item text on the server side without success.

<tree id="0"> <item text="Bourne.Jason" id="Actor-1000" im0="assets/person.gif" im1="assets/person.gif" im2="assets/person.gif"> <userdata name="emp">Bourne.Jason</userdata> <item style="color: red;" text="Weapons need to be tested" id="Backlog-3307" im0="assets/spider.gif" im1="assets/spider.gif" im2="assets/spider.gif"/> </item>

The dataprocessor is declared and initialised:

mnutree.loadXML("model/get_actor_props.php"); myDP = new dataProcessor("model/upd_tree_props.php"); myDP.init(mnutree); myDP.setTransactionMode("GET", false);

On a drag on drop action in the Tree the server side code traps the request and processes the GET and writes the incoming data to file:

[0] => Actor
[1] => 1013

[0] => Backlog
[1] => 3219

[editing] => true
[tr_id] => 3219
[tr_pid] => 1013
[tr_order] => 1
[tr_text] => Weapons need to be tested
[!nativeeditor_status] => updated
[dhxr1472280814616] => 1

I’m not seeing ant UserData.

What needs to be done? Ideally I would like to just send the item text and avoid using the UserData tag.


    What I was after was the text of the parent.
    Either if I dragged a child within the same branch (say Actor) what is the parent text (of tr_pid) - Jason Bourne
    or dragged a child (of Jason Bourne) into a different parent (say Daniel Craig).

How to pass the .getItemText(tr_pid) through to the server via the dataprocessor?



Unfortunately it is not available to send the parent node value from the dataprocessor.
The only way is to get this attribute right on your server-side as you know the id of the node.


Thank you.
In the end that was my solution. Initially, the id for the parent (Actor) was arbitrary and only useful for the life of the tree. Therefore I had to persist the actor in the repository with a UID.