dbTreeview: Restore state not possible

Hi everyone

We have certain problems with the component DBTreeView (Servoy Extra Components), since we updated from NG to TiNG.

The main problem is that customers are opening a branch and selecting a leaf, switching to another layout to check something and then, when they come back to the layout with the dbtreeview, the tree is completely closed. I think normally the treeview should be in the same state as before a layout switch, like in NG.

Is there already a fix for this problem in the dbtreeview component in TiNG?
Or do we now have to call a function to restore this state?

Then there are some other problems. I thought I could remember the state of the tree, when customers are leaving the layout and restore it, when they come back to avoid the problem. But some functions on the treeview do not seem to be working.

The function to get the path of the tree works fine.

var dbtreeview = forms.myForm.elements.DBTreeTableViewreturn dbtreeview.getSelectionPath();

This will return an array of strings. E.g.

[5286dd1f-302c-43e3-9200-be12dd00ae5d, 227f1dbe-7695-4662-9071-580bfc5ff5d3, 591d4303-fe74-4c57-87a9-3178a92fc3ce]

When I try the following code or parts of it nothing works.

var dbtreeview = forms.myForm.elements.DBTreeTableView
	
var pk = ["5286dd1f-302c-43e3-9200-be12dd00ae5d"];

//	var pk = [“5286dd1f-302c-43e3-9200-be12dd00ae5d”, “227f1dbe-7695-4662-9071-580bfc5ff5d3”, “591d4303-fe74-4c57-87a9-3178a92fc3ce”]; // a deeper path

dbtreeview.setSelectionPath(pk);
dbtreeview.setExpandNode(pk, true);
dbtreeview.refresh();

Neither the function setSelectionPath does select anything nor does the function setExpandNode open any branches. Both alone and with or without refresh. By calling the refresh function the tree is flickering a little bit. That’s all.
Also the function isNodeExpanded(pk) seems not to work.

By the way I found a function dbtreeview.setNodeLevelVisible(1, true); that works somehow and will open the whole tree. But the first parameter level has no effect. Unfortunately there is no use to us for this function.

Does anyone using those functions successfully?
Is there something I’m doing wrong? (e.g. call another refresh function or pass the array pk in another way)

We use servoy version: 2024.3.6.3949_LTS

Thanks
Gregory

I think it’s better to create a case directly for what you describe (list all the problems in the case).

You can always do a quick test with the latest release of Servoy and the latest release of the package - just to see if it was fixed.