jquery - How to get all the values of checkboxes into a controller -
jquery - How to get all the values of checkboxes into a controller -
i need list of checkboxes jsp page spring-mvc controller. problem need know if these checkboxes checked or not. create things worse, need set them list of objects. guys have thought how it?
edited: grabbing them submit form method
in jsp page, this:
<form:form class="form-horizontal" method="get" action="${pagecontext.request.contextpath}/${path }" id="productform" commandname="product"> <c:foreach var="color" items="${product.colors}" > <div class="row"> <div class="col-sm-1">${color.colorcode}</div> <div class="col-sm-4">price <input type="text" value="${color.colorpriceus}" name="color.colorpriceus" id="color.colorpriceus"></div> <div class="col-sm-4"><input type="checkbox" name="color.hideprice" id="color.hideprice">do not show price</div> </div> <hr style="border-color: black"> </c:foreach> </form:form>
as can see here, need set value of chexbox list of color
object when pass spring-mvc controller. i need know if value checked or not.
should using jquery - ajax? or should check on controller itself?
hope can help out guys. thanks!
jquery jsp spring-mvc checkbox
Comments
Post a Comment