DBTreeTableView bean: What am I doing wrong?

Hi,

Hours and hours I spend to get the DBTreetableView bean with multiple relations getting to work, but still no result.
What am I doing wrong?

	var _binding1, _binding2

	//	bean_629 is a DBTreeTableView bean
	_binding1 = elements.bean_629.createBinding('myServer', 'sec_program');
	_binding1.setTextDataprovider('display_description');
	
	var _relations = new Array();
	
	_relations[0] = elements.bean_629.createRelationInfo()
	_relations[0].setLabel('Tabs')
	_relations[0].setNRelationName('sec_program_to_sec_programtabs')

	_binding1.setNRelationInfos(_relations)	
	
	_binding2 = elements.bean_629.createBinding('myServer', 'sec_programtabs');
	_binding2.setTextDataprovider('display_description');
	
	var _fs = databaseManager.getFoundSet('myServer', 'sec_program');
	_fs.loadAllRecords()
	
	elements.bean_629.addRoots(_fs)

The result I see is the following:

[attachment=1]Capture1.JPG[/attachment]

This looks fine, because I know there are related records to be shown. So the + before the Tabs node ,looks logic to me.

But when I open the + Tabs, then nothing is shown, and I see this:

[attachment=0]Capture2.JPG[/attachment]

And this is wrong, because there are related records (2 in this case)

What am I doing wrong?

In this sample I showed only 1 relation, but finally I’ll need 2 different relations .
I tried that also, but that doesn’t work. For the sample I just used 1 relation to show

Martin

Capture2.JPG

Capture1.JPG

hi Martin,

your code is correct, there was a issue in the bean
related to multiple relations, that is fixed in the next release;
you can also download the fixed bean from : http://www.servoy.com/downloads/downloa … eeview.jar

regards

Hi Gabi,

Is this fixed bean compatible with Servoy 5.2.4?

And the URL links to the dbtreeview.jar and the situation occurs in the dbtreetableview.
Are those beans the same?

Martin

hi Martin,

yes, it is compatible; the dbtreeview.jar contains both beans

regards