DBTreeView alternative?

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

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.

A picture is worth a thousand words…

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

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?

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.

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

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 :(

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

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 for that.

Why can’t you use foundsets and relations ?

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

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! :) 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

Wow!

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

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

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
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

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)

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)

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.

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 … 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!!!

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

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

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:

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.

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!