public Object[] getChildren(Object parentElement) { List<FuncNodeVO> list = new ArrayList<FuncNodeVO>(); FuncNodeVO vo = (FuncNodeVO) parentElement; String pk = vo.getPk_func(); for (int i = 0; i < funvosExfun.length; i++) { if (pk.equals(funvosExfun[i].getPk_parent())) list.add(funvosExfun[i]); } return list.toArray(list.toArray(new FuncNodeVO[0])); }
public boolean hasChildren(Object element) { FuncNodeVO vo = (FuncNodeVO) element; String pk = vo.getPk_func(); for (int i = 0; i < funvosExfun.length; i++) { if (pk.equals(funvosExfun[i].getPk_parent())) { return true; } } return false; }