Duplicate Folders (Child Nodes) are displayed


Duplicate Sub-Folders (Child Nodes) are displayed when a Parent Folder is expanded in the Tree View. The Child Nodes are retrieved dynamically using a server side script (JSP page) and there are no issues with the script itself or the XML that is generated.

This issues seems to be happening when a user clicks multiple times on a particular Folder. As the Folder is trying to load asynchronously, if the user clicks on the Folder button before the Child Nodes are displayed, the duplicate Child Folders seem to be surfacing. Is there anyway to restrict the user from repeatedly clicking on a Folder while it is trying to load its contents or some other way to prevent the duplicate folders being displayed.

Attaching the pertinent code snippet and a snapshot of the error.

Appreciate your feedback.

treeBug.zip (16.6 KB)

I had the same problem , before tree starts loading I open a “modal” window which just says:

“Loading please wait”

The user can’t click on anything till it’s loaded (loading takes less than 1-2 secs but it’s enough for the user to doubleclick or click anywhere else and mess things up).

then i have a “tree.OnXLE” event which just closes the please_wait window.

Hope this helps

Thank you for your valuable suggestion. I was able to implement a workaround using the approach you suggested. Implemented onXLS and onXLE events for the tree in which I was hiding and displaying a DHTML Layer. The layer contained an image (animated spinning gif). So even though I didn’t use any Modal Windows, user sees the visual indicator and hence doesn’t repeatedly click on the Folder.