<html:select size="6" multiple="true" property="propertyName">
[1 or more ,,tags]
</html:select>
property属性:与ActionForm Bean中的某个属性对应,这个属性用来存放用户在里表上选中选项的值
1.下拉列表框中显示的数据从数据库中取
一般在Action里调用DAO,作为request的一个属性传到页面上;这时一般用标签
在action中
IClusterService clusterService = (IClusterService) getBean("clusterService");
List arrayList=new ArrayList();
arrayList=clusterService.findList("from Cluster clusters where clusters.id<>''");
request.setAttribute("clusterList",arrayList);
页面
<html:select property="cluster">
--请选择--
</html:select>
2.下拉列表框中的数据不从数据库去取,而是值固定的
一般把这种放到 ActionForm 里,作为属性在页面上取,这时一般用