Mik*_*ike 13 spring spring-mvc
我正在开发一个spring应用程序,现在我已经使用以下命令向我的一个jsp页面添加了一个下拉列表:
<form:select multiple="single" path="users[y.count-1].X" items="${Y}" itemValue="id" itemLabel="name"/>
现在我想添加默认值"Nothing selected",但我似乎无法找到如何做到这一点.我试过了:
<form:select multiple="single" path="users[y.count-1].X" items="${Y}" itemValue="id" itemLabel="name">
   <form:option value="Nothing selected" />
</form:select>
但是"我没有选择"没有显示在我的下拉列表中.
Jac*_*son 18
你应该能做到的
<form:select multiple="single" path="users[y.count-1].X" >
   <form:option value="Nothing selected" />
   <form:options items="${Y}"  itemValue="id" itemLabel="name" />
</form:select>
| 归档时间: | 
 | 
| 查看次数: | 27897 次 | 
| 最近记录: |