dimanche 9 juillet 2017

how to get the values of a entire table having text and checkbox fields jsp to servlet

I have a jsp which iterates through a list printing the first name, last name and Paid (Checkbox). All these values come from oracle DB. Paid checkbox is editable (So, the user can check/uncheck the checkbox). I'm having a problem in getting all the updated values from jsp to servlet. I need to know how to get the entire list back in servlet with the checkbox updated values. Please let me know.

JSP Code snippet.

`>

 <c:forEach items="${nameList}" var="nameObj">  
<tr>  
  <td><label>${nameObj.firstName}</label></td>  
  <td><label>${nameObj.lastName}</label></td>  
  <c:if test="${nameObj.paid}">  
      <td><input type="checkbox" name="paid" id="paid" checked ></td>  
</c:if>  
</tr>  

`




Aucun commentaire:

Enregistrer un commentaire