Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Somehow on Apr 02, 2009 19:39
open dhtmlx forum
Can't get DHTMLXTree working for JSF, fails with "Incorrect XML" and "reffers to non-existing parent"

Can't get DHTMLXTree working, fails with "Incorrect XML" and "reffers to non-existing parent"

Hello,

I'm evaluating DHTMLXTree and I can't get it to work, and I can't see where my code could be wrong.


<jsp:root version="2.1" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:webuijsf="http://www.sun.com/webui/webuijsf">
<jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
<f:view>
<webuijsf:page id="page1">
<webuijsf:html id="html1">
<webuijsf:head id="head1">
<webuijsf:link id="link1" url="/resources/stylesheet.css"/>
<webuijsf:link id="link2" url="/css/common.css"/>
<webuijsf:link id="link3" url="/js/tree/dhtmlxtree.css"/>

<webuijsf:script id="script1" url="/js/tree/dhtmlxcommon.js"/>
<webuijsf:script id="script2" url="/js/tree/dhtmlxtree.js"/>
<webuijsf:script id="script3" url="/js/common.js"/>

</webuijsf:head>
<webuijsf:body id="body1" style="-rave-layout: grid">
<webuijsf:form id="form1">
<table width="100%" height="100%" cellpadding="0" cellspacing="0" border="0" style="table-layout:fixed;">
<tr>
<td valign="top" width="100%">
<div id="myDocument" style="width:276px; height:700px;background-color:#f5f5f5;border :1px solid Silver;"></div>
</td>
</tr>
</table>

<webuijsf:script>
tree=new dhtmlXTreeObject("myDocument","100%","100%",0);
tree.setImagePath("../js/tree/imgs/");
tree.enableCheckBoxes(false);
tree.loadXML("document.xml");
</webuijsf:script>
</webuijsf:form>
</webuijsf:body>
</webuijsf:html>
</webuijsf:page>
</f:view>
</jsp:root>

Do you have any idea what the problem could be from looking at the source? Thanks
Answer posted by Alex (support) on Apr 03, 2009 05:04

Hello, 

Please, check that "document.xml" is correct. 

The article http://dhtmlx.com/docs/products/dhtmlxGrid/doc/articles/Common_Problems_in_Grid.html describes the most common reasons for "incorrect xml" problem. 

If issue still occurs, provide this xml. So, we can check it.