Index: standard/project/web/src/main/java/egovframework/api/rivalWar/menu/controller/AdminMenuController.java =================================================================== diff -u -r974e18d8bc54bfc15498088d56968c25bdeabf44 -r719cc312c906a7f758f977c425a7983e27d7a746 --- standard/project/web/src/main/java/egovframework/api/rivalWar/menu/controller/AdminMenuController.java (.../AdminMenuController.java) (revision 974e18d8bc54bfc15498088d56968c25bdeabf44) +++ standard/project/web/src/main/java/egovframework/api/rivalWar/menu/controller/AdminMenuController.java (.../AdminMenuController.java) (revision 719cc312c906a7f758f977c425a7983e27d7a746) @@ -108,14 +108,23 @@ MenuDTO targetMenuNode = menuService.getNode(jsTreeHibernateDTO); - HashSet dummyChatDTOs = new HashSet(); - targetMenuNode.setDirectChatDTOs(dummyChatDTOs); - if ( menuService.alterNode(targetMenuNode) == 1 ){ - jsTreeHibernateDTO.setStatus(menuService.removeNode(jsTreeHibernateDTO)); - }else{ - throw new RuntimeException("none remove target node"); + if(targetMenuNode.getDirectChatDTOs().size() > 0){ + + final HashSet dummyChatDTOs = new HashSet(); + targetMenuNode.setDirectChatDTOs(dummyChatDTOs); + menuService.alterNode(targetMenuNode); + + HashSet targetChatDTOs = (HashSet) targetMenuNode.getDirectChatDTOs(); + for (DirectChatDTO loopChatDTO :targetChatDTOs) { + directChatService.removeNode(loopChatDTO); + } } + + + + jsTreeHibernateDTO.setStatus(menuService.removeNode(targetMenuNode)); + setJsonDefaultSetting(jsTreeHibernateDTO); ModelAndView modelAndView = new ModelAndView("jsonView"); Index: standard/project/web/src/main/webapp/WEB-INF/tags/jstree.tag =================================================================== diff -u -r6eb8c9f10e9760f829ca900f780b209fe7080028 -r719cc312c906a7f758f977c425a7983e27d7a746 --- standard/project/web/src/main/webapp/WEB-INF/tags/jstree.tag (.../jstree.tag) (revision 6eb8c9f10e9760f829ca900f780b209fe7080028) +++ standard/project/web/src/main/webapp/WEB-INF/tags/jstree.tag (.../jstree.tag) (revision 719cc312c906a7f758f977c425a7983e27d7a746) @@ -15,7 +15,8 @@ <%@ attribute name="moveNode"%> \ No newline at end of file