dhtmlXTree + Dataprocessor + Contextmenue

Hello,

i’ve spend long time googeling my question but couldn’t find any information.
Maybe someone can push me in the right direction.

I startet with DHX-Components with Tree and Dataprocessor version 3.6 .
Unfortunately i didn’t load all components of 3.6
Now i had to load the actual version, because i had to add contextmenu.
The migration was a little bit tricky but it workes fine now

except of my problem:

In the earlier version my update.php was called with these POST-Parameters:

Array ( ... [tr_id] => -1 [tr_pid] => 6 [tr_order] => 0 [tr_text] => Neues Objekt [!nativeeditor_status] => inserted ... )

Width the actual version it is called with these parameters:

Array ( ... [-1_tr_id] => -1 [-1_tr_pid] => 6 [-1_tr_order] => 0 [-1_tr_text] => Neues Objekt [-1_!nativeeditor_status] => inserted ... )

I could find neither documentation nor sample for this behavior. The only thing i have found was some javascript code in a sample of contextmenu which seems to break something at ‘_’ boundry.
No idea for what this is good for.

Any help welcome.

Thx, Frank

Additional Information:

if moving elements via drag’n’drop it is called that way:

Array ( ... [1082_tr_id] => 1082 [1082_tr_pid] => 1075 [1082_tr_order] => 0 [1082_tr_text] => 1082 - P18 Kopie [1082_href] => view_maschine.php?KEY=1082&ACT=SEL [1082_tgt] => IHBody [1082_!nativeeditor_status] => updated ... )

Add the next line after the initialization of dataprocessor

dp.init(); dp.setTransactionMode("POST", false); // < this one!

That’s it. Great!
Thank you.

What is this method for?
I mean except for using different POST-Parameters? :mrgreen:
The documentation for the method
[url]http://docs.dhtmlx.com/api__dataprocessor_settransactionmode.html[/url]
does not give many infos.

Thanks and Bye.
Frank

OK, i hate it most if someone posts a question answering himself with a stupid ‘got it to work’…

So here’s a summary of what i think what happened:

In case of objects having the ability to multiselect entries you may have the choice to call
the update.php of the dataprocessor entry by entry or you call it once with all selected entries.
This may look like my previously mentioned situation.

Because i used the new version in combination with adding contextmenu the next assumptions are not clear. Without comparing the older documention/samples this hard to figure out:

scenario1: The earlier version did not support multiselect in that way so everything was fine.
scenario2: It is a matter of contextmenu so it might appear also if had used contextmenu with the earlier version.

However:
As a php programmer there might be a better and more obvious and more selfdocumenting way to handle this:

Array => ( ... [params] => Array [1882] => Array ( [tr_id] => 1082 [tr_pid] => 1075 [tr_order] => 0 [tr_text] => 1082 - P18 Kopie [href] => view_maschine.php?KEY=1082&ACT=SEL [tgt] => IHBody [!nativeeditor_status] => updated ) [1883] => Array ( [tr_id] => 1083 [tr_pid] => 1075 [tr_order] => 0 [tr_text] => 1083 - P19 Kopie [href] => view_maschine.php?KEY=1083&ACT=SEL [tgt] => IHBody [!nativeeditor_status] => updated ) } ... )

As a not so experienced javascript programmer i don’t know if this is so easy.

Greets
Frank

Before DHTMLX 4.0, package was based on separate js files. There was separate file for tree and separate file for connector.js ( optional server side layer, for data saving ). Including connector.js changes the default mode of dataprocessor.

Starting from version 4.0, we are providing the compiled dhtmlx.js, which includes connector.js by default, and as result default mode of dataprocessor was changed.

Before version 4.0 dataprocessor works in “send only one data saving package by request”, after 4.0 dataprocessor uses “send multiple data saving packages by request”. You can use setTransactionMode API to return settings to the old one.