action代码片段
复制代码 代码如下:
public String execute() {
String ret = super.execute();
if (RETURN_LIST.equals(ret)) {
return list();
} else {
return ret;
}
}
public String list() {
String show = this.getRequest().getParameter("show");
if ("show".equals(show)) {
return show();
}
deptid = getRequest().getParameter("deptid");
if (StringUtils.isNotBlank(deptid)) {
epVO.getEp().setDeptid(Long.valueOf(deptid));
epVO.setDeptid(deptid);
}
if (StringUtils.isNotBlank(deptname)) {
epVO.getDept().setDeptname(deptname);
}
if (StringUtils.isNotBlank(plateno)) {
epVO.setPlateno(plateno);
}
if (StringUtils.isBlank(deptid)) {
epVO.getEp().setDeptid(Long.parseLong("1"));
}
int count = epService.getEpCount(epVO);
PageInfor pageInfor = this.pageInit(this.getRequest(), count);
epVO.setRownum_(pageInfor.getRownum_());
epVO.setRownum(pageInfor.getRownum());
epVO.setOrderName(pageInfor.getOrderName());
List
this.getRequest().setAttribute(Constants.QUERY_DATA, list);
this.getRequest().setAttribute(Constants.PAGE_INFO, pageInfor);
List
Map
hidden.put("epVO.ep.id", "车辆ID");
hidden.put("epVO.dept.deptid", "部门ID");//jQuery(function()中取隐藏域中的值
hidden.put("epVO.ep.name", "车牌号");//jQuery(function()中取隐藏域中的值
hidden.put("epVO.ep.eptype", "类型");
this.getRequest().setAttribute("hidden", hidden);
String flag = this.getRequest().getParameter("flag");
this.getRequest().setAttribute("flag", flag);
return RETURN_LIST;
}
jsp页面引用代码片段
复制代码 代码如下:
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%@ taglib uri="/WEB-INF/web.tld" prefix="web"%>
href="scripts/DhtmlTree/css/dhtmlxtree.css">
showlist="hidden" top="false" mode="radio" />
mode="radio" />
<>
jsp被引用js代码片段
复制代码 代码如下: