在form中提交list
来源:互联网 发布:java即时通信 编辑:程序博客网 时间:2024/05/24 03:09
1. form把对应的entity如下,
public class DailyReport extends DataEntity<DailyReport> { private Integer dailyReportId; private User user; @JsonFormat(pattern = "yyyy-MM-dd") private Date dailyDate; private Date createDate; private Date updateDate; private List<DailyReportDetail> dailyReportDetailList; private String isPublish;2. 页面
<div class="dailyReportDetailItem"> <div class="control-group"> <label class="control-label">项目:</label> <div class="controls"> <select class="projectInfo" name="dailyReportDetails[0].projectInfo.id"> <option value="0">--请选择项目--</option> <c:forEach items="${projectList}" var="projectInfo"> <option value="${projectInfo.id}" ${projectInfo.id==projectId0?"selected='selected'":''}> ${projectInfo.projectName} </option> </c:forEach> </select> </div> </div>3. 定义要提交的List,的entity.
public class DailyReportDetailList { private List<DailyReportDetail> dailyReportDetails; public List<DailyReportDetail> getDailyReportDetails() { return dailyReportDetails; } public void setDailyReportDetails(List<DailyReportDetail> dailyReportDetails) { this.dailyReportDetails = dailyReportDetails; } public DailyReportDetailList(List<DailyReportDetail> dailyReportDetails){ super(); this.dailyReportDetails = dailyReportDetails; } public DailyReportDetailList(){ super(); }}
阅读全文
0 0
- 在form中提交list
- 在struts form中使用Map List
- MVC中form提交和在控制器中怎样接受
- MVC中form提交和在控制器中接收数据
- 在struts中向window.open提交form信息
- Yii 在iframe中预览form提交的图片…
- 在JS中写form表单的提交与判断
- Flex form 提交list数据表单
- SpringMVC form表单提交list对象集合
- Form中实现动态List
- Form中实现动态List
- 通过jquery load在list页面多次加载详情页,导致的多form校验以及提交问题
- 在IE6下form表单提交无效
- Form表单的提交在IE6中对common-fileupload上传速度的影响
- jquery.form.js插件中ajaxSubmit提交在jquery1.4版本中的应用
- 在同一form表单中如何提交两个不同的action
- 在同一form表单中如何提交两个不同的action
- 用JS创建form在FireFox中不能提交的问题
- ibatis数据源迁移(Oracle到MySQL)
- mysql中检查列名是否存在
- java反射用法
- 利用fastjson对json转map的操作
- termios 详解
- 在form中提交list
- 分享制作windows10官方u盘启动图文教程
- jietty跨域请求
- Android Studio 编译速度优化,aar引用优化
- 【Linux】使用ftp传输文件
- 微信支付V3的WXUtil文件
- 设计模式 1-23 单例模式
- java中的多线程
- Oracle 查询表空间的存储大小和已使用率