# DBTreeView alternative?

**URL:** <https://forum.servoy.com/t/dbtreeview-alternative/11206>\
**Category:** Classic Servoy\
**Created:** [September 28, 2009, 12:40am UTC](https://forum.servoy.com/t/dbtreeview-alternative/11206 "2009-09-28T00:40:03Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![maria](https://avatars.discourse-cdn.com/v4/letter/m/34f0e0/32.png) [@maria](https://forum.servoy.com/u/maria)\
**Post date:** [September 28, 2009, 12:40am UTC](https://forum.servoy.com/t/dbtreeview-alternative/11206/1 "2009-09-28T00:40:03Z")

</div>

I’m currently using the bean DBTreeView to display the main menu of application modules (customers, employees, etc.).  
But the presentation does not really look good because of the dotted lines between the nodes of the tree.  
I’d like to preserve the tree functionality but make it look like a normal list menu with submenu items popping up of it (sliding out would be cool, fancy presentation is more than welcome).  
Is it possible to hide these connector lines or maybe there is an alternative to the tree, a decent example would be much appreciated.  
Thanks.

Cheers,  
Maria

---

<div class="post-metadata">

**Author:** ![ngervasi](https://avatars.discourse-cdn.com/v4/letter/n/f9ae1b/32.png) [@ngervasi](https://forum.servoy.com/u/ngervasi)\
**Post date:** [September 28, 2009, 10:16am UTC](https://forum.servoy.com/t/dbtreeview-alternative/11206/2 "2009-09-28T10:16:36Z")

</div>

Have a look at the DBTreeTableView bean, it’s a variant of the DBTree bean and it’s included in the Servoy default install, maybe it could fit your needs.

---

<div class="post-metadata">

**Author:** ![ngervasi](https://avatars.discourse-cdn.com/v4/letter/n/f9ae1b/32.png) [@ngervasi](https://forum.servoy.com/u/ngervasi)\
**Post date:** [September 28, 2009, 10:19am UTC](https://forum.servoy.com/t/dbtreeview-alternative/11206/3 "2009-09-28T10:19:25Z")

</div>

A picture is worth a thousand words…

[attachment=0]Screen shot 2009-09-28 at 12.17.42.png[/attachment]

 ![Screen shot 2009-09-28 at 12.17.42.png](https://canada1.discourse-cdn.com/flex010/uploads/servoy/original/1X/26a525a7d18815ce8977e6f33a7e840febbd6d35.png)

---

<div class="post-metadata">

**Author:** ![maria](https://avatars.discourse-cdn.com/v4/letter/m/34f0e0/32.png) [@maria](https://forum.servoy.com/u/maria)\
**Post date:** [September 28, 2009, 11:58pm UTC](https://forum.servoy.com/t/dbtreeview-alternative/11206/4 "2009-09-28T23:58:13Z")

</div>

> ngervasi:  
> A picture is worth a thousand words…
> 
> [attachment=0]Screen shot 2009-09-28 at 12.17.42.png[/attachment]

Nicola,  
I saw this picture and was trying to reproduce a similar view under Windows but in vain.  
I can’t use setShowsRootHandles(false) (based on JTree class) with DBTreeView, it’s not recognized by the bean.  
Do you know how to make it work?

---

<div class="post-metadata">

**Author:** ![maria](https://avatars.discourse-cdn.com/v4/letter/m/34f0e0/32.png) [@maria](https://forum.servoy.com/u/maria)\
**Post date:** [September 28, 2009, 11:59pm UTC](https://forum.servoy.com/t/dbtreeview-alternative/11206/5 "2009-09-28T23:59:27Z")

</div>

> ngervasi:  
> Have a look at the DBTreeTableView bean, it’s a variant of the DBTree bean and it’s included in the Servoy default install, maybe it could fit your needs.

setShowsRootHandles(true) does not work on this one either.  
I don’t really need a table view of the tree, thanks.

---

<div class="post-metadata">

**Author:** ![ngervasi](https://avatars.discourse-cdn.com/v4/letter/n/f9ae1b/32.png) [@ngervasi](https://forum.servoy.com/u/ngervasi)\
**Post date:** [September 29, 2009, 12:12am UTC](https://forum.servoy.com/t/dbtreeview-alternative/11206/6 "2009-09-29T00:12:02Z")

</div>

Sorry, then I guess I can’t help you. I think that the appearence of the tree is based on the look&feel.

---

<div class="post-metadata">

**Author:** ![maria](https://avatars.discourse-cdn.com/v4/letter/m/34f0e0/32.png) [@maria](https://forum.servoy.com/u/maria)\
**Post date:** [September 30, 2009, 2:53am UTC](https://forum.servoy.com/t/dbtreeview-alternative/11206/7 "2009-09-30T02:53:38Z")

</div>

> ngervasi:  
> Sorry, then I guess I can’t help you. I think that the appearence of the tree is based on the look&feel.

Looks like they do ![:(]( "Sad")

---

<div class="post-metadata">

**Author:** ![domnulnopcea](https://avatars.discourse-cdn.com/v4/letter/d/439d5e/32.png) [@domnulnopcea](https://forum.servoy.com/u/domnulnopcea)\
**Post date:** [October 5, 2009, 11:52am UTC](https://forum.servoy.com/t/dbtreeview-alternative/11206/8 "2009-10-05T11:52:24Z")

</div>

Hello,

I am in great need of a tree bean that would allow me to take it’s data from a dataset or array or something!

The dbtreebean uses a parent-children relation to retrieve the data but this does not help me!

Do you know an alternative?

I would appreciate it!

Thanks

---

<div class="post-metadata">

**Author:** ![ROCLASI](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/roclasi/32/4371_2.png) [@ROCLASI](https://forum.servoy.com/u/ROCLASI)\
**Post date:** [October 5, 2009, 12:21pm UTC](https://forum.servoy.com/t/dbtreeview-alternative/11206/9 "2009-10-05T12:21:56Z")

</div>

Hi,

First of, it’s not needed to post the same question in 2 different threads. It doesn’t make it answered any faster.  
As for your question, right now the DBTreeView bean doesn’t use datasets. You can [file a feature request](http://www.servoy.com/s) for that.

Why can’t you use foundsets and relations ?

---

<div class="post-metadata">

**Author:** ![domnulnopcea](https://avatars.discourse-cdn.com/v4/letter/d/439d5e/32.png) [@domnulnopcea](https://forum.servoy.com/u/domnulnopcea)\
**Post date:** [October 5, 2009, 12:39pm UTC](https://forum.servoy.com/t/dbtreeview-alternative/11206/10 "2009-10-05T12:39:00Z")

</div>

but is there a tree bean in witch I could load a data differently from using a relation parent-children?

---

<div class="post-metadata">

**Author:** ![Gary\_R.Schaecher](https://avatars.discourse-cdn.com/v4/letter/g/9de0a6/32.png) [@Gary\_R.Schaecher](https://forum.servoy.com/u/Gary_R.Schaecher)\
**Post date:** [October 5, 2009, 1:24pm UTC](https://forum.servoy.com/t/dbtreeview-alternative/11206/11 "2009-10-05T13:24:16Z")

</div>

There is a bean that works in the SmartClient and WebClient called treeview bean. We paid to have it developed. It works with datasets very well. It is very complete. It supports style sheets, right mouse cliecks, etc. We told Servoy that they could provide it other clients if they wished to do so. In fact we have asked that it be delivered as an out-of-the-box item. Would make our installs much simpler if they did! ![:)]( "Smile") We had to have datasets rather than just foundsets to accomplish what we were doing in our Omnis environment. Ask Servoy if you can use it…

Gary  
TMA Systems, LLC

---

<div class="post-metadata">

**Author:** ![domnulnopcea](https://avatars.discourse-cdn.com/v4/letter/d/439d5e/32.png) [@domnulnopcea](https://forum.servoy.com/u/domnulnopcea)\
**Post date:** [October 5, 2009, 1:31pm UTC](https://forum.servoy.com/t/dbtreeview-alternative/11206/12 "2009-10-05T13:31:10Z")

</div>

Wow!

thanks a lot for this info! You are very kind!

I will start the procedure to contact about this bean! Thank you again!

---

<div class="post-metadata">

**Author:** ![Gabi\_Boros](https://avatars.discourse-cdn.com/v4/letter/g/73ab20/32.png) [@Gabi\_Boros](https://forum.servoy.com/u/Gabi_Boros)\
**Post date:** [October 12, 2009, 11:39am UTC](https://forum.servoy.com/t/dbtreeview-alternative/11206/13 "2009-10-12T11:39:06Z")

</div>

Hi to all,

Here is the link to the treeview bean, an alternative for dbtreeview, that works with datasets instead of foundsets.  
[http://www.servoy.com/downloads/downloa … plugin.zip](http://www.servoy.com/downloads/downloads/bean_plugin/treeview_plugin.zip)  
Please note that it only works with Servoy 5.0 !

P.S:  
The zip file contains the bean, a brief description of its functions, and a sample solution

---

<div class="post-metadata">

**Author:** ![rioba](https://avatars.discourse-cdn.com/v4/letter/r/aca169/32.png) [@rioba](https://forum.servoy.com/u/rioba)\
**Post date:** [October 13, 2009, 7:13am UTC](https://forum.servoy.com/t/dbtreeview-alternative/11206/14 "2009-10-13T07:13:17Z")

</div>

I have imported the sample solution included with the TreeView plugin. When I try to expand the main.js form node in the Solution Explorer panel in Eclipse the arrow disappears and nothing is shown (controller, elements and so on). The start.js form is ok. As a consequence, when I try to start the smart client, after the initial form, I get an error

> TypeError: Cannot call method “setDataSet” of undefined (xxx/workspace/servoy\_sample\_treeview/forms/main.js#46)  
> at xxx/workspace/servoy\_sample\_treeview/forms/main.js:46 (initTreeview)

---

<div class="post-metadata">

**Author:** ![Gabi\_Boros](https://avatars.discourse-cdn.com/v4/letter/g/73ab20/32.png) [@Gabi\_Boros](https://forum.servoy.com/u/Gabi_Boros)\
**Post date:** [October 13, 2009, 7:56am UTC](https://forum.servoy.com/t/dbtreeview-alternative/11206/15 "2009-10-13T07:56:36Z")

</div>

copy the treeview.jar from the zip into \<servoy5\_dir\>/application\_server/beans;  
the sample uses svyCore as module, you need to have that in the workspace; if  
you do not have it, you can checkout it from “localhost” using Servoy’s team provider

> rioba:  
> I have imported the sample solution included with the TreeView plugin. When I try to expand the main.js form node in the Solution Explorer panel in Eclipse the arrow disappears and nothing is shown (controller, elements and so on). The start.js form is ok. As a consequence, when I try to start the smart client, after the initial form, I get an error
> 
> > TypeError: Cannot call method “setDataSet” of undefined (xxx/workspace/servoy\_sample\_treeview/forms/main.js#46)  
> > at xxx/workspace/servoy\_sample\_treeview/forms/main.js:46 (initTreeview)

---

<div class="post-metadata">

**Author:** ![rioba](https://avatars.discourse-cdn.com/v4/letter/r/aca169/32.png) [@rioba](https://forum.servoy.com/u/rioba)\
**Post date:** [October 13, 2009, 12:31pm UTC](https://forum.servoy.com/t/dbtreeview-alternative/11206/16 "2009-10-13T12:31:28Z")

</div>

Thank you, I was confused by the fact that the sample solution is called “servoy\_sample\_treeview” and therefore I put the jar file into the plugins folder instead of the bean’s one.

---

<div class="post-metadata">

**Author:** ![mboegem](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/mboegem/32/4399_2.png) [@mboegem](https://forum.servoy.com/u/mboegem)\
**Post date:** [October 15, 2009, 10:23am UTC](https://forum.servoy.com/t/dbtreeview-alternative/11206/17 "2009-10-15T10:23:46Z")

</div>

> Gabi Boros:  
> Here is the link to the treeview bean, an alternative for dbtreeview, that works with datasets instead of foundsets.  
> [http://www.servoy.com/downloads/downloa](http://www.servoy.com/downloads/downloa) … plugin.zip  
> Please note that it only works with Servoy 5.0 !

Any chance this can easily work in 4.1.3 as well?  
This would help us a lot!!!

---

<div class="post-metadata">

**Author:** ![Gabi\_Boros](https://avatars.discourse-cdn.com/v4/letter/g/73ab20/32.png) [@Gabi\_Boros](https://forum.servoy.com/u/Gabi_Boros)\
**Post date:** [November 12, 2009, 3:55pm UTC](https://forum.servoy.com/t/dbtreeview-alternative/11206/18 "2009-11-12T15:55:53Z")

</div>

Hi to all,

A new version of the treeview bean, with bugs fixed and a few improvements is available at  
[http://www.servoy.com/downloads/downloa … plugin.zip](http://www.servoy.com/downloads/downloads/bean_plugin/treeview_plugin.zip)

Please note that it only works with Servoy 5.0 !

P.S:  
The zip file contains the bean, a brief description of its functions, and a sample solution

---

<div class="post-metadata">

**Author:** ![jbader](https://avatars.discourse-cdn.com/v4/letter/j/dfb087/32.png) [@jbader](https://forum.servoy.com/u/jbader)\
**Post date:** [December 2, 2009, 1:44pm UTC](https://forum.servoy.com/t/dbtreeview-alternative/11206/19 "2009-12-02T13:44:35Z")

</div>

Gabi,

This component appears to not be 100% functional in webclient in Servoy 5. There appears to be an issue with context?

Try setting the callback of anyone of the available callbacks to a method similar to:

```auto
function foo() {
 forms.myForm.controller.show();
}

```

You will see that the code runs fine in smart client, but fails without throwing either a JS or Java error in webclient and locks up webclient entirely.

---

<div class="post-metadata">

**Author:** ![mboegem](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/mboegem/32/4399_2.png) [@mboegem](https://forum.servoy.com/u/mboegem)\
**Post date:** [December 2, 2009, 10:05pm UTC](https://forum.servoy.com/t/dbtreeview-alternative/11206/20 "2009-12-02T22:05:19Z")

</div>

Hi Gabi,

the bean works fine for us, although it’s easy to get it resulting in null pointer errors. (Which has everything to do with not following your instructions down to the letter)

One important thing we noticed is the bean can not handle a string (UUID’s) as id/pid which is a pity.  
This makes the bean less flexible to implement as you need to ‘translate’ all UUID’s of the data you need to integers and keep this translation in memory as well.

Would it be very much work to change this behaviour and let the bean take strings as well as integers for these two columns?

thnkx very much!

[Next page](https://forum.servoy.com/t/dbtreeview-alternative/11206.md?page=2)
