Requirements: Score entry (input Multiple course results, batch submission)
Use the List to receive the bulk data submitted by the page, receive it through the wrapper Pojo , and define it in the wrapper Pojo List<pojo> Property
Public class itemsqueryvo { // commodity information private items items; // For system extensibility, the original generated PO is extended Private itemscustom itemscustom; // Bulk Product Information Private list<itemscustom> itemslist;}
Controller:
// Bulk modification of product submissions // The Itemsqueryvo receives bulk-submitted product information and stores the product information in the Itemsqueryvo itemslist attribute. @RequestMapping ("/edititemsallsubmit") public String edititemsallsubmit ( itemsqueryvo itemsqueryvo) throws Exception { return " Success "; }
Page Definition:
varstatus= "status"><tr> <td><input name= "itemslist[${status.index}". Name "value=" ${item.name} "/></td> <td><input name=" Itemslist[${status.index}].price "value= "${item.price}"/></td> <td><input name= "Itemslist[${status.index}].createtime" value= "< Fmt:formatdate value= "${item.createtime}" pattern= "Yyyy-mm-dd HH:mm:ss"/> "/></td> <td>< Input name= "Itemslist[${status.index}].detail" value= "${item.detail}"/></td></tr></c:foreach >
SPRINGMVC List Bindings