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