Hi there,
I’m using dhtmlSuite V2.5 Pro build 91111 and I’m having a rather strange rendering problem with a tree I’m building dynamically and updating with smartRefreshBranch. I’ve spent a while trying to reduce the problem to its simplest state and I think this is about as simple as I can make it (the real problem has several trees on the page and event/timer based updating and enables smartXMLParsing):
DESCRIPTION:
dhxLayout object filling browser window
dhxTimelineTree=new dhtmlXTreeObject(“timelineTreeBox”,“100%”,“100%”,0);
dhxTimelineTree.setImagePath(“…/public/imgs/csh_dhx_skyblue/”);
dhxTimelineTree.setXMLAutoLoading(“xtimelinetree.php”);
dhxTimelineTree.loadXML(“xtimelinetree.php”);
dhxLayout.items[1].attachObject(“timelineTreeBox”);
then on a form:
<INPUT TYPE=“button” NAME=“a” VALUE=“a” onClick=“dhxTimelineTree.smartRefreshBranch(“0”);”/>
Some simplified example XML from the server end looks like:
<?xml version="1.0" encoding="ISO-8859-1"?>PROBLEM:
What I find is that if the server generating this XML adds nodes periodically and groups them such that there are a limited number of child items per top level node and when one is full, a new one is created, if I interactively open the first top level node then smartRefreshBranch() post creation of a new top level node, the new node is misrendered as being a child of the first open top level node and furthermore attempts to deleteChildItems(“0”) and loadXML without forcing a page refresh fail.
I get this in the Error Console of Firefox:
Error: uncaught exception: [Exception… “Node cannot be inserted at the specified point in the hierarchy” code: “3” nsresult: “0x80530003 (NS_ERROR_DOM_HIERARCHY_REQUEST_ERR)” location: “http://10.129.144.21/nuget_centre/public/dhtmlxtree.js Line: 70”]
And this during a deleteChildItems(“0”)/loadXML
Error: uncaught exception: [Exception… “Node was not found” code: “8” nsresult: “0x80530008 (NS_ERROR_DOM_NOT_FOUND_ERR)” location: “http://10.129.144.21/nuget_centre/public/dhtmlxtree.js Line: 179”]
However, forcing a clean reload of the tree data renders it correctly.
I’ve attached a screenshot of the misrendering as the description isn’t necessarily very clear
The problem occurs both on Firefox 3.5 and MSIE 6
Any assistance you could offer would be very gratefully received as I’ve spent a little while trying permutations of options trying to fix this now.