我已经从数据库中填充了下拉列表。当我提交表单时,下拉列表显示为空。 这是我的jsp代码。
<spring:bind path="company">
<div class="form-group">
<span>${companyname}</span> <label
class="control-label col-sm-3" for="companyname">Company
Name:</label>
<div class="col-sm-8">
<select class="selectpicker" data-live-search="true"
id="compamycode" name="compamycode" path="company">
<option data-tokens="ketchup mustard" value="">--Select
Options--
</option>
<c:forEach var="compnayList" items="${company}">
<option data-tokens="ketchup mustard"
value="${compnayList.softcode}">${compnayList.codDes}</option>
</c:forEach>
</select>
</div>
</div>
</spring:bind>
这是我的控制器代码
@ModelAttribute("company")
public List<CodMasterModel> getCompanyInfo() {
List<CodMasterModel> customers = dao.isData();
return customers;
}