Hi, I am a littlebit irritated about documentation of set_response_xml.
What I want/need to do is write custom labels in a tree which is managed by a treeconnector.
If not working with treeconnector, it works well.
For example loading this xml file makes no problems:
The corresponding js code:
function init()
{
var main_layout = new dhtmlXLayoutObject(document.body, ‘1C’);
var a = main_layout.cells('a');
a.hideHeader();
var tree = a.attachTree();
tree.loadXML("test.xml");
}
But there is no complete description out there, how to work together with a treeconnector.
So I am lost with the following none-working version!
I know, that afterProcessing is only called after insert, update, delete but I tried also other events and no one worked!
<?php require_once("config.php"); $database=mysql_connect($srv,$usr,$pwd); mysql_select_db($mysql_db); require("tree_connector.php"); $treeConnector = new TreeConnector($database); function custom_text($action) { $action->set_response_xml("It works"); } $treeConnector->event->attach( "afterProcessing", custom_text ); $treeConnector->render_table("xref_object_subject","id","title,element_type","","pid" ); ?>Does anybody know, how to use set_response_text() ?
Thanks in advance!