TreePath selectionPath[] = getTreeView().getSelectionPath();
if(selectionPath != null){
for(int i=0; i < selectionPath.length; i++){
TreePath treePath = selectionPath[i];
DefaultMutableTreeNode treeNode = (DefaultMutableTreeNode) treePath.getLastPathComponent();
treeNode.removeAllChildren();
if(treeNode.getParent() != null){
Object userObject = treeNode.getUserObject();
if(userObject instanceof Category){
Category category = (Category)userObject;
Collection items = categoryDAO.loadItemsForCategory(category.getId());