jeudi 17 novembre 2016

Attendance List with checkboxes submission from jsp form to spring mvc controller

I am displaying list of students with checkbox each to take attendance for each student. for checkbox I had assigned value="${studentId}" and for checkbox path="presentFlag" presentFlag is a boolean type and my part of iteration in jsp looks like this

.jsp

<c:if test="${not empty studentsList}">
    <c:forEach items="${studentsList}" var="student">
        <tr>
            <td>${student[0]}</td>
            <td>${student[1]}</td>
            <td>${student[2]}</td>
            <td><input type="checkbox" path="attendance.presentFlag" value="${student[0]}" /></td>
    </c:forEach>
</c:if> 

I can call post method of spring mvc controller but unable to get form details in controller. can any one please suggest me how can i send my jsp form details to controller and to proceed further. I have to check whether checkbox is checked or not. please suggest me in this regard.




Aucun commentaire:

Enregistrer un commentaire