dhtmlXTreeObject virtual root

I try the following

– 1 –
sfCatalogId = “proj1384”;
tree1 = new dhtmlXTreeObject(“TheMaster”,“100%”,“100%”,sfCatalogId);
tree1.setXMLAutoLoading(“getCatalog.jsp”);
tree1.loadXML("getCatalog.jsp);

This does not work at all. Screen is blank.

– 2 –
tree1 = new dhtmlXTreeObject(“TheMaster”,“100%”,“100%”,“proj1384”);
tree1.setXMLAutoLoading(“getCatalog.jsp”);
tree1.loadXML("getCatalog.jsp);

The getCatalog.jsp still gets a null value for the “id”. I would expect the value “proj1384”.

I could pass sfCatalogId as a parameter like tree1.loadXML(“getCatalog.jsp?sfCatalogId=proj1384”);

But I do not prefer this.

How can I pass the value of a variable as the virtual root value?

Thanks.

“id” parameter is passed only when a branch is loaded dinamically.

If you load an initial structure, root id isn’t sent. So you can do the following:

tree1 = new dhtmlXTreeObject(“TheMaster”,“100%”,“100%”,“proj1384”);
tree1.setXMLAutoLoading(“getCatalog.jsp”);

tree1.loadXML(“getCatalog.jsp?id=proj1384”);