在上篇文章给大家介绍了,本文给大家介绍jquery easyui实现动态树。
首先是在jsp页面中引入相关的js文件 在body中加入流程列表,通过后天拼接json数据 具体内容请看下面代码详情吧。
首选在jsp页面中引入相关的js
在body中加入
- 流程列表
后台拼接json数据
"+wfTo.getWfname()+"\",\n" +
" \"state\":\"closed\"\n" +
" },";
}
int end=jsonstr.length()-1;//去掉最后一个逗号
String json=jsonstr.substring(0,end);
json=json+"]";
response.setContentType("application/json;charset=gbk");
response.setCharacterEncoding("gbk");
PrintWriter pw = response.getWriter();
pw.write(json);
pw.flush();
}else{
List wfNodes=formConfigService.findWfNodesById(wfId);
for(int i=0;i"+wfNodesTo.getGenstepname()+"("+wfNodesTo.getNodeid()+")\",end);
json=json+"]";
response.setContentType("application/json;charset=gbk");
response.setCharacterEncoding("gbk");
PrintWriter pw = response.getWriter();
pw.write(json);
pw.flush();
}
return null;
}
public void setFormConfigService(FormConfigService formConfigService) {
this.formConfigService = formConfigService;
}
}
下面一段代码是EasyUI Jquery 动态加载树,点击节点加载