- if(parentElement instanceof Classification){
- children = ((Classification) parentElement).getChildNodes().toArray();
- }
- //taxon node
- if(parentElement instanceof ITaxonTreeNode){
- ITaxonTreeNode treeNode = (ITaxonTreeNode) HibernateProxyHelper.deproxy(parentElement);
- List<TaxonNode> childrenSet = treeNode.getChildNodes();
- HHH_9751_Util.removeAllNull(childrenSet);
- children = childrenSet.toArray();
+// if(parentElement instanceof Classification){
+// children = taxonNodeService.listChildNodesAsUuidAndTitleCache(((Classification)parentElement).getRootNode()).toArray();
+//// children = ((Classification) parentElement).getChildNodes().toArray();
+// }
+// //taxon node
+// if(parentElement instanceof ITaxonTreeNode){
+// ITaxonTreeNode treeNode = (ITaxonTreeNode) HibernateProxyHelper.deproxy(parentElement);
+// List<TaxonNode> childrenSet = treeNode.getChildNodes();
+// HHH_9751_Util.removeAllNull(childrenSet);
+// children = childrenSet.toArray();
+// }
+
+ if(parentElement instanceof TaxonNode){
+ children = taxonNodeService.listChildNodesAsTaxonNodeDto((TaxonNode)parentElement).toArray();
+ }else {
+ children = taxonNodeService.listChildNodesAsTaxonNodeDto((UuidAndTitleCache<TaxonNode>)parentElement).toArray();