---
title: "html:select"
author: "小牛犊"
date: "2008-09-24T11:29:59Z"
tags: []
slug: "html-select"
draft: false
lastmod: "2008-09-24T11:29:59Z"
id: 246209
url: "https://xiaoniudu2008.iteye.com/blog/246209"
---

```
<html:form action="/department.do?method=addDep" method="post">
						
			<html:select property="dep_id" >
				<html:options collection="list" labelProperty="depName" property="dep_id" /> 
			</html:select>
			<input type="submit" value="submit">
		</html:form>
```

 

```
public class DepartmentForm extends ActionForm {
	private static final long serialVersionUID = -7999273122578907163L;

	private Integer dep_id;
	private String depName;
	private Integer depState;

	public Integer getDep_id() {
		return dep_id;
	}

	public void setDep_id(Integer dep_id) {
		this.dep_id = dep_id;
	}

	public String getDepName() {
		return depName;
	}

	public void setDepName(String depName) {
		this.depName = depName;
	}

	public Integer getDepState() {
		return depState;
	}

	public void setDepState(Integer depState) {
		this.depState = depState;
	}

	@Override
	public void reset(ActionMapping mapping, HttpServletRequest request) {
		// TODO Auto-generated method stub
		super.reset(mapping, request);
	}

	@Override
	public ActionErrors validate(ActionMapping mapping,
			HttpServletRequest request) {
		// TODO Auto-generated method stub
		return super.validate(mapping, request);
	}

}
```