方法
@RequestMapping(value="distributionRoom")
public String distributionRoom(AppjwInvigilatePlan appjwInvigilatePlan,Model model){
List<AppjwInvigilatePlan>roomTeacher=this.appJwJkjsjlExtendService.getTeacherRanndomRoom(appjwInvigilatePlan);
model.addAttribute("roomTeacher", roomTeacher);
return "apps/jw/jkjsjl/appJwJkjsjlArrangeTeacherRoomList";
}
页面
<c:forEach items="${roomTeacher}" var="appjwInvigilatePlan">
<c:forEach items="${appjwInvigilatePlan.appJwJsglList}" var="jsgl" varStatus="vs">
<tr>
<td>${appjwInvigilatePlan.appJwJxXqgl.xqmc}</td>
<td>${appjwInvigilatePlan.appJwKsap.ksmc}</td>
<td>${appjwInvigilatePlan.appJwJxKm.kmmc}</td>
<td>${jsgl.ksmc}</td>
<td>
<c:forEach items="${jsgl.userList}" var="teacher">
${teacher.name}
</c:forEach>
</td>
<td>
<fmt:formatDate value="${appjwInvigilatePlan.jkkssj}" pattern="yyyy-MM-dd HH:mm:ss"/>
</td>
<td>
<fmt:formatDate value="${appjwInvigilatePlan.jkjssj}" pattern="yyyy-MM-dd HH:mm:ss"/>
</td>
</tr>
</c:forEach>
</c:forEach>
把这个遍历循环写到表单里,在表单中创建一个table,写在table中,页面的保存按钮加一个方法,点击时提交表单。