I have a treeview populated from a sql query that is only two layers deep. I have the ability to pass a multiselection to a querie’s where clause but I am not able to get the children of a parent node. Do I need to write the recursion in python or is there a built in way to get children when the selected item = -1?
code for pulling multi select values when each child is selected:
tv = event.source.parent.getComponent('tv') def get_list(): item_list =  if event.source.selectedItem != -1: selection = tv.getSelectedItems() for item in selection: item_list.append("'"+tv.data.getValueAt(item,"AccCode")+"'") else print event.source.selectedItem return ','.join(item_list) filter = get_list() if len(filter) > 0: event.source.parent.gl_acc_list = filter