关注JEECG发展历程 关注最新动态和版本, 记录JEECG成长点滴 更新日志 - 技术支持 - 招聘英才

JEECG最新版本下载 JEECG智能开发平台 - 显著提高开发效率 常见问题 - 入门视频 - 参与开源团队

商务QQ: 69893005、3102411850 商务热线(5*8小时): 010-64808099 官方邮箱: jeecgos@163.com

查看: 8154|回复: 3

[UI标签] 新增和修改按钮,为什么有得会往后台传参数,有得不传。

[复制链接]
发表于 2018-7-25 08:41:57 | 显示全部楼层 |阅读模式
jeecg版本3.7.3,角色页面,如图,点击用户录入和用户编辑两个按钮的时候,他们的url都是同样的。为什么到了后台后,StringUtil.isNotEmpty(user.getId()),一个为空,一个不为空。 11.png 22.png
发表于 2018-7-25 09:52:54 | 显示全部楼层
编辑按钮方法在请求之前会获取选中行的数据id ,传递过去
添加按钮没有做这块的处理  所以不回传递id
 楼主| 发表于 2018-7-25 11:46:06 | 显示全部楼层
fly1206 发表于 2018-7-25 09:52
编辑按钮方法在请求之前会获取选中行的数据id ,传递过去
添加按钮没有做这块的处理  所以不回传递id ...

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<%--<t:datagrid name="userList" title="user.manage" actionUrl="roleController.do?roleUserDatagrid&roleId=${roleId}" fit="true" fitColumns="true" idField="id">--%>
<%--        <t:dgCol title="common.id" field="id" hidden="true" ></t:dgCol>--%>
<%--        <t:dgCol title="common.username" sortable="false" field="userName" width="5"></t:dgCol>--%>
<%--        <t:dgCol title="common.real.name" field="realName" width="5"></t:dgCol>--%>
<%--</t:datagrid>--%>

<t:datagrid name="roleUserList" title="common.operation"
            actionUrl="roleController.do?roleUserDatagrid&roleId=${roleId}" fit="true" fitColumns="true" idField="id" queryMode="group">
        <t:dgCol title="编号" field="id" hidden="true"></t:dgCol>
        <t:dgCol title="common.username" sortable="false" field="userName" width="200" query="true"></t:dgCol>
        <t:dgCol title="common.real.name" field="realName" width="200" query="true"></t:dgCol>
        <t:dgCol title="common.status" sortable="true" width="100" field="status" replace="common.active_1,common.inactive_0,super.admin_-1"></t:dgCol>
        <t:dgCol title="common.operation" field="opt" width="200" ></t:dgCol>
        <t:dgDelOpt title="common.delete" url="roleController.do?delUserRole&userid={id}&roleid=${roleId }" urlclass="ace_button"  urlfont="fa-trash-o"/>
        <t:dgToolBar title="common.add.param" langArg="common.user" icon="icon-add" url="userController.do?addorupdate&roleId=${roleId}" funname="add"></t:dgToolBar>
        <t:dgToolBar title="common.edit.param" langArg="common.user" icon="icon-edit" url="userController.do?addorupdate&roleId=${roleId}" funname="update"></t:dgToolBar>
        <t:dgToolBar title="common.add.exist.user" icon="icon-add" url="roleController.do?goAddUserToRole&roleId=${roleId}" funname="add" width="600"></t:dgToolBar>
</t:datagrid>这个是右侧页面的代码。没有做处理啊。
 楼主| 发表于 2018-7-25 14:41:27 | 显示全部楼层
fly1206 发表于 2018-7-25 09:52
编辑按钮方法在请求之前会获取选中行的数据id ,传递过去
添加按钮没有做这块的处理  所以不回传递id ...

我发的帖子的第一个图片,中点击“添加已有客户”,是怎么传递参数的?
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表