search

Home  >  Q&A  >  body text

java - Spring mvc passes a list to the page for rendering. The page has a save button and then passes the list back to the background. How to achieve

method

@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";
}

page

                        <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>
                    
高洛峰高洛峰2775 days ago468

reply all(1)I'll reply

  • 阿神

    阿神2017-05-17 10:02:42

    Write this traversal loop into the form, create a table in the form, write it in the table, add a method to the save button of the page, and submit the form when clicked.

    reply
    0
  • Cancelreply