【发布时间】:2015-09-16 13:17:21
【问题描述】:
我正在使用 bootstrap duallistbox 在我的站点中进行多选。我正在使用spring mvc。问题是当我尝试发布我的选择时收到错误的请求响应。这是我的选择标签结构:
<select multiple="multiple" name="selectedUsers" id="selectedUsers" class="form-control">
<c:forEach items="${allUsers}" var="item">
<c:choose>
<c:when test="${fn:contains(selectedUsersList, item.id.toString())}">
<option value="${item.id}" selected>${item.username}</option>
</c:when>
<c:otherwise>
<option value="${item.id}">${item.username}</option>
</c:otherwise>
</c:choose>
</c:forEach>
</select>
发布的数据是: profileType=0&selectedUsers=4444444&selectedUsers=aaaaaa&selectedUsers=893247 &_selectedUsers=1
如您所见,我正在接收 selectedUsers 但不是以正确的方式进行绑定。
谁能指导我如何完成这项工作? 提前谢谢。
【问题讨论】:
标签: twitter-bootstrap spring-mvc listbox multi-select