SPRINGMVC List Bindings

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.