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