html:select 提交问题
Action:
ArrayList<User> userlist = new ArrayList<User>();
userlist.add(new User("1","合格"));
userlist.add(new User("2","非订货"));
userlist.add(new User("3","工段废品"));
userlist.add(new User("4","退库废品"));
requset.setAttribute("user",uesrlist);
POJO:
public class User{
private Integer id;
private String uservalue;
//get,,set
}
JSP :
<html:select property="userlist">
<html:option value="">请选择</html:option>
<html:optionCollections name="user" label="id" value="uservalue"/>
</html:select>
现在的问题是?
怎样将选中的单值提交到后台对应的Action,并把值保存到数据里面.
如:选择了2 ,非订货
怎样取出value的值?