Hello all ,
I searched whole forum for the documentation for a Dbtreeview and the one that i found was not that helpful .This is my code for the multi table tree .
This is my code for Tree
var first_bind = elements.bean_rec_nav.createBinding( _SERVER, firstbinding);
first_bind.setNRelationName(_relation)
first_bind.setChildSortDataprovider(first_sort_dp) // first_sort_dp-calculation which returns string (string : “second_bind_name asc”)
first_bind.setTextDataprovider(_dp)
first_bind.setMethodToCallOnClick(callmethod,“_id”)
var second_bind = elements.bean_rec_nav.createBinding( _SERVER, secondbinding);
second_bind.setTextDataprovider(second_dp);
second_bind.setChildSortDataprovider(second_sort_dp)// second_sort_dp-calculation which returns string (string : “third_bind_name asc”)
second_bind.setNRelationName(2_relation);
second_bind.setMethodToCallOnClick(callmethod,“_id”)
var third_bind = elements.bean_rec_nav.createBinding( _SERVER, thirdbinding);
third_bind.setNRelationDataprovider(2_relation);
third_bind.setTextDataprovider(third_dp);
third_bind.setMethodToCallOnClick(callmethod,“_id”)fs = databaseManager.getFoundSet( _SERVER, thirdbinding)
fs.loadAllRecords();
fs.sort(relation.first_bind_name); //this sorts mother node
var rel_fs = databaseManager.convertFoundSet(fs,fs_relation);elements.bean_rec_nav.removeAllRoots();
elements.bean_rec_nav.refresh();
elements.bean_rec_nav.addRoots(rel_fs);
The tree is loaded just fine , and the sorting of the mother node is just fine as i am sorting it through the foundset , but seems like sorting of child node is not working , i dont know if there is something that i am doing wrong or the DBtreeview plugin does not support sort for multitable tree .would really appreciate your help .Thank you .