jsp中一个页面引入另一个页面的实现代码

复制代码 代码如下:


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<EpVO> list = epService.getEps(epVO);
        this.getRequest().setAttribute(Constants.QUERY_DATA, list);
        this.getRequest().setAttribute(Constants.PAGE_INFO, pageInfor);

List<Object> editors = new ArrayList<Object>();
        editors.add(new EditorExt("text", "deptname", "公司"));
        editors.add(new EditorExt("text", "plateno", "车牌号"));
        editors.add(new EditorExt("text", "deptid", "ID"));
        this.getRequest().setAttribute("editor", editors);
        List<Object> header = new ArrayList<Object>();
        List<Object> header = new ArrayList<Object>();
        header.add(new Header("index", "序号", "index", "2%"));//1
        header.add(new Header("epVO.dept.deptname", "部门", null, "6%"));// 2 jQuery(function()中取普通的值 用下标取 下标是它出现的位置
        header.add(new Header("epVO.ep.name", "车牌号", null, "5%"));//3
        header.add(new Header("epVO.ep.epid", "内部编号", null, "5%"));//4
        header.add(new Header("epVO.ep.eptype", "类型", null, "4%"));//5
        header.add(new Header("epVO.ep.devid", "设备号", null, "8%"));
        header.add(new Header("epVO.ep.devtype", "设备类型", null, "4%"));
        header.add(new Header("epVO.ep.phone", "电话", null, "5%"));
        header.add(new Header("epVO.ep.charge", "年服务费", null, "5%"));
        header.add(new Header("epVO.ep.info", "备注", null, "15%"));
        this.getRequest().setAttribute("header", header);
        this.getRequest().setAttribute("header", header);

Map<String, String> hidden = new LinkedHashMap<String, String>();
        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);

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

转载注明出处:https://www.heiqu.com/wzfdxw.html