Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Raymond Blenkiron on Sep 02, 2008 03:44
open dhtmlx forum
dhtmlxTree dataprocessor sample malfunction

Refer to the following gallery - http://www.hsyst.com.au/gallery/main.php?g2_view=core.ShowItem&g2_itemId=629

These images show the issues I was having with the dhtmlxTree dataprocessor. I believe there are some "refresh" errors in the samples as provided in the download.

Fig. _samples_tree_db
Shows the table samples_tree as constructed by executing the SampleDB.sql DDL

Fig. _insert_01
Shows the error that happens every time you insert a record. To get these items in the tree required a number of "Add node..." executions. The error was consistent for each insert. Some node items were amended directly in the database.

Fig. _insert_02
Shows the associated records in the table. It also shows that the GUID is not really a globally unique identifier.

Fig. _insert_03
Shows an attempt at editing the child of "Brother" node. The usual error was returned. (It would appear that the error message dialog box is modal and I had to close it to get a screen shot).

Fig. _insert_04
Shows, that despite the "Bro1 Son01" was still in bold text in the tree, its associated record in the table had been updated.

Fig. _insert_05
Shows that "Bro1 Son01" was still in bold text even though I had used the navigation keys to traverse up the tree to the parent and back down again. I had "Add node ..." again and edited the "New Item" to "Bro1 Son02" . Both leaf nodes are in bold text still.

Fig. _insert_06
Shows that "Bro1 Son02" had been inserted into the table. It also shows, what I suspect, are two "New item" nodes that were created when using the navigations keys as in above.

Fig. _insert_07
Shows the tree after forcing a "refresh" / "reload" by clicking on the "Updating server datasource" in the Sample tree.

Fig. _insert_08
Shows the tree after "Delete selected row". The deleted node is shown bold with strikethrough

Fig. _insert_10
Shows that the node has been deleted from the table. Well maybe it has if there is auto ordering of nodes.
Answer posted by Support on Sep 02, 2008 03:49

>>Shows the error that happens every time you insert a record.

The error caused by incorrect XML response, which may be caused by some kind of server side error or incorrect server side code configuration. 
You can use 
   dataproc.enableDebug(true)
to check the exact value returned by server side code. 

The server side response must be a valid XML with correct action|sid|tid attributes. If structure of XML corrupted by some addiitional output - it will cause all mentioned errors.

Please check "XML loading" section of next article 
           http://dhtmlx.com/docs/products/dhtmlxGrid/doc/articles/Common_Problems_in_Grid.html#grid_art_comprob