treeview实现多级树形菜单 后台JSON格式如何组织(2)

@RequestMapping("/FarmDoctypeLoadTreeNodes") @ResponseBody public Map<String, Object> loadTreeNodes(DataQuery query, HttpServletRequest request, String id) { query = EasyUiUtils.formatGridQuery(request, query); try { List<BootstrapUiTreeNode> treeNodes = BootstrapUiTreeNode.createTreeNodes(id, "SORT", "FARM_DOCTYPE", "ID", "PARENTID", "NAME"); return ViewMode.getInstance().putAttr("nodes", treeNodes).returnObjMode(); } catch (Exception e) { log.error(e.getMessage()); return ViewMode.getInstance().setError(e.getMessage()).returnObjMode(); } }

访问结果:

treeview实现多级树形菜单 后台JSON格式如何组织

最终树形菜单效果:

treeview实现多级树形菜单 后台JSON格式如何组织

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/8a676f8441ca0f853daca24bbacb8a01.html