Hi, i want to submit list of object of selectted check box and want to receive same object in controller from jsp.

Jsp Code-><form name="multiCheckBox" method="post" action="multiCheckbox.html">


        <th>Below are the list of items with status</th>
        <td>Print Strip</td>      
        <td>Planogram DB Key</td>
        <td>Planogram Name</td>
        <td>Planogram Description</td>
        <td>Print PDF</td>
        <td>Pause Printer</td>

    <c:forEach var="printStripList1" items="${printStripList}">

                     <input type="hidden" name="printStrip" value="${printStripList1.printStrip}"/>
                    <input type="hidden" name="planogramDBKey" value="${printStripList1.planogramDBKey}"/>
                    <input type="hidden" name="planogramDescrition" value="${printStripList1.planogramDescrition}"/>
                    <input type="hidden" name="status" value="${printStripList1.status}"/>
                    <input type="hidden" name="printPdf" value="${printStripList1.printPdf}"/>
                    <input type="hidden" name="pausePrinter" value="${printStripList1.pausePrinter}"/>
                <input type="checkbox" name="planogramName" value="${printStripList1.planogramName}">

                      <td><c:out value='${printStripList1.printStrip}' /></td>
                      <td><c:out value='${printStripList1.planogramDBKey}' /></td>
                      <td><c:out value='${printStripList1.planogramName}' /></td>
                      <td><c:out value='${printStripList1.planogramDescrition}' /></td>
                      <td><c:out value='${printStripList1.status}' /></td>
                      <td><c:out value='${printStripList1.printPdf}' /></td>
                      <td><c:out value='${printStripList1.pausePrinter}' /></td>

            <INPUT id="submit" name="submit" type="submit" value="Submit Items"/>

Inline Code Example Here

        Display page->

        on display page when i am getting 10 checkbox an i am selecting 3. At controller when i am selecting the values

        String[] planogramName = request.getParameterValues("planogramName");
        String[] printStrip = request.getParameterValues("printStrip");
        String[] planogramDBKey = request.getParameterValues("planogramDBKey");
        String[] planogramDescrition = request.getParameterValues("planogramDescrition");
        String[] status = request.getParameterValues("status");
        String[] printPdf = request.getParameterValues("printPdf");
        String[] pausePrinter = request.getParameterValues("pausePrinter");

        On planogramName am receiving 3 array object but for other am getting 10. I want only those 3 selected. How i can achieve this. Please help
2 Years
Discussion Span
Last Post by anubhavat

For hidden also i want only those three selected. How to achieve that?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.