DBTreeView alternative?

jbader:
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,

issue is fixed, and the bean has been update; you can download it from the same url

regards

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

hi,

please fill a feature request for this

regards

Thanks Gabi. Works great now.

Gabi Boros:

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

hi,

please fill a feature request for this

regards

Case filed: #259306

Signed version available?

yes, http://www.servoy.com/downloads/downloa … plugin.zip has the signed bean

Were there any changes to this other than signing?

news from the last release :

features (the documentation is updated with these):

  • allow non integer ids;
  • added onNodeSelected callback support;
  • if only the tree column is displayed, use the tree selection highlight;
    fixes:
  • row/node clicking;
  • keep tree column width setting;

The bean is no longer functional for me on the mac. When clicking subnodes the parent node now collapses. The bean is unusable.

Would it be possible to get the old version signed??

Thanks

why not sign the bean yourself if you need it asap?

Glad to. Problem is I don’t have it anymore. If someone can make the old version available I’m glad to self sign.

Thanks Johan

Is there a repo for his plugin? Is it open source? Whom is the official author/owner…Servoy? Is it an officially supported bean?

here is the old bean, signed : http://www.servoy.com/downloads/downloa … in_5xx.zip

Thank you!

in example, dataset is created manually (createEmptyDataSet),
, i try to create trought table queary (getDataSetByQuery), and desn’t work
erroar with empty message occour
what happen…?

the code

var vQuery =" SELECT id,pid,nm_menu as treecolumn,execute as column1,‘’ as column2,‘’ as column3,‘group.png’ as icon,‘false’ as editable from app_menu"
globals.treeviewDataSet=databaseManager.getDataSetByQuery(‘sipti2000’, vQuery, null, 1000);
elements.treeview.setDataSet(globals.treeviewDataSet);
elements.treeview.setStyleSheet(globals.myStyle);

please help me, what’s going on …thanks for your help

can you limit your dataset query to max 5 rows, and paste
here the return of application.output(globals.treeviewDataSet) ?

AgusRupendi:
in example, dataset is created manually (createEmptyDataSet),
, i try to create trought table queary (getDataSetByQuery), and desn’t work
erroar with empty message occour
what happen…?

the code

var vQuery =" SELECT id,pid,nm_menu as treecolumn,execute as column1,‘’ as column2,‘’ as column3,‘group.png’ as icon,‘false’ as editable from app_menu"
globals.treeviewDataSet=databaseManager.getDataSetByQuery(‘sipti2000’, vQuery, null, 1000);
elements.treeview.setDataSet(globals.treeviewDataSet);
elements.treeview.setStyleSheet(globals.myStyle);

please help me, what’s going on …thanks for your help

Gabi

We are now using your modified bean to create tree views by hand (rather than dataset based) which is exactly what we needed thanks for sharing.

However we would like to change the style sheet using a .css rather than the string sample you supplied.

Can we call the .css in code on initialisation of the bean and if so could you give us an example of how to make the call and how the .css might be formatted for the treeview?

Kahuna:
Gabi

We are now using your modified bean to create tree views by hand (rather than dataset based) which is exactly what we needed thanks for sharing.

However we would like to change the style sheet using a .css rather than the string sample you supplied.

Can we call the .css in code on initialisation of the bean and if so could you give us an example of how to make the call and how the .css might be formatted for the treeview?

this is not possible with the current version, but in the next version, that will be
released for the upcoming major release of Servoy, it will be able to use the css defined in Servoy

Any news about this? I’m having an hard time trying to style the treebean…

for the treeview bean you still need to set the style using the bean’s
setStyleSheet function, and also, there is only a couple of attributes
that can be set : background-color, color, font & border;
as of Servoy 6, beans can also read stylesheets from Servoy, so it is possible
to add this support (you may create a FR for this here https://www.servoyforge.net/projects/se … iew/issues ), but the supported attributes would remain the same; if you wish
also having new attributes, create a FR for that too, and name them, so we can check if it
is possible to add those

regards,
Gabi