WebTreeView

I am starting to work on a new opensource webtreeview, which pulls its data from a SQLite self-referenced database table.

Upon first selection of a node the treeview is not as quickly responding as I wished and I guess there must be smarter ways to achieve what I like.

If you have time to check this out, I would be grateful for any feedback.

Test Webapp online:
http://www.verifier.ch:7070

Source:
https://github.com/oleman108/imwebtree

Screenshot:

i just try the web app. i click on top of tree view like DIENSTLEISTER and it does not do anything.
Should it be closing the item from Bank to Telefon?

i am teasing on the Mac OSX 10.12.6

Oliver, I cannot access your test application from my current location. However, two things come to mind:
1- I have my own system for a webtreeview, based on a control by Daniel Taylor. The important point here is that I designed my treeview to only fetch items as required. The elements of the treeview are arranged by level in the database, with also a reference to the parent. On “show”, I only fetch level 1 items. Then for each item selection, I check the type of item (item, folder) when folder, If siblings are not present, then I fetch only those siblings for the next level. And so on. It makes the overall control quite responsive.
2- Many webapps are already database driven. As is often the case, menu data is already in the main database. Perhaps, making your control database agnostic would be a good idea. Just a suggestion.
3- Your control appears to be based on the weblistbox. This is a good thing, it will futureproof the control. I like to make the background of my treeview invisible so the control blends with the background, in contrast with listboxes that I like to contrast with the background. Perhaps You could offer styles for blended and for contrasting treeviews. Now, this is certainly something that we can handle on our own. Just brainstorming here.

Your project sounds very interesting. I will test it as soon as I get back home, where I control the firewall.

@Richard Duke : No, currently it is doing nothing but changing color, when you click on a node. I am trying to get feedback at this early state, in order to be able to correct eventual wrong design.

@Louis Desjardins : Thanks for the input! I’m thinking about redesigning the control this way: Each node can hold an array of child-nodes, similar to how Björn is doing it in his desktop treeview plugin. Each node could hold an ‘expanded’ bool property, and if it is true, then one would work down the children with recursive calls to some load method.

The control is not based on the weblistbox, but on WebContainers. Each Node is a WebContainer, embedded into the parent ‘WebTree’ WebContainer.

The database table looks like this:

To fix this and improve the subsequent clicks you need to implement the click handling (and in the future, expansion and collapsing) browser side, in Javascript.

Looks neat!

You may be able to speed up things using “with”-queries to get a hierarchical recordset. See the section “Controlling Depth-First Versus Breadth-First Search Of a Tree Using ORDER BY” at https://sqlite.org/lang_with.html. With-queries are supported by most modern dbms. Well, that would require some SQL skill on the end users part, but that’s life. If this is speedy enough you don’t need to fiddle with javascript.
Also, the nodes that don’t contain any subs should not display disclosure triangles.