怎样在easyUi里面获取到easyui-tree
来源:互联网 发布:it专业课程 编辑:程序博客网 时间:2024/06/06 04:49
html :
<ul class="easyui-tree" data-options="url:'../module/getTree.do',method:'get',animate:true,dnd:true"></ul>
java
getTree(){
JsonObject obj= null;
JsonArray ary = null;
Map<String,Object> map =new HashMap<String , Object>();
map.put("parentId", StringUtils.trimToNull(parentId));
List<Moudle> list=service.selectBYParentid(map);
if (modules != null && modules.size() != 0) {
if (modules != null && modules.size() != 0) {
for (Module module : modules) {
object = JsonUtils.toJSONObject(module);
getSubModulesRecursively(object, map);
jsonArray.add(object);
}
}
}
private void getSubModulesRecursively(JSONObject module, Map<String, Object> map) {
module.put("type", "M");
module.put("text", module.get("name"));
// map.put("parentId", module.get("id"));
// module.put("__id__", module.get("id"));
// module.put("id", UUID.randomUUID().toString());
JSONObject object = null;
JSONArray array = new JSONArray();
map.put("moduleId", module.get("id"));
List<Function> functions = functionService.selectByModuleId(map);
if (functions != null && functions.size() != 0) {
for (Function function : functions) {
object = JsonUtils.toJSONObject(function);
object.put("type", "F");
object.put("text", function.getName());
object.put("__id__", function.getId());
object.put("id", UUID.randomUUID().toString());
array.add(object);
}
}
if (array.size() != 0) {
module.put("children", array);
}
}
- 怎样在easyUi里面获取到easyui-tree
- easyui-tree动态获取
- easyUI 附加tree节点到tree
- easyui ---tree
- easyUI Tree
- easyui Tree
- easyui-tree
- easyui tree
- easyUI-tree
- EasyUI-Tree
- easyUI-tree
- easyui-tree
- easyUi--tree
- easyui-tree
- easyui Tree
- EasyUI tree扩展获取实心节点
- EasyUI tree扩展获取实心节点
- EasyUI tree扩展获取实心节点
- 求两个或N个数的最大公约数(gcd)和…
- CodeForces 158C.Cd and pwd command
- struct学习
- Spreadsheet 常用属性
- CS与BS区别
- 怎样在easyUi里面获取到easyui-tree
- Jquery 基础
- CSDN密码又被改了
- 杨辉三角
- Java生成流水号 - 1
- 黑马程序员-if else与三元运算符
- 黑马程序员-数组
- Java生成流水号 -2 支持数据库查询,Spring注入
- Hibernate一对一双向关联(外键关联)用法小结