JSP
<
html:form action
=
"
/updatePermission.do
"
method
=
"
post
"
>
< html:select name = " updatePermissionForm " property = " user " style = " width:152px " >
< html:optionsCollection name = " userList "
label = " label " value = " value " />
</ html:select >
< html:submit ></ html:submit >
</ html:form >
form
< html:select name = " updatePermissionForm " property = " user " style = " width:152px " >
< html:optionsCollection name = " userList "
label = " label " value = " value " />
</ html:select >
< html:submit ></ html:submit >
</ html:form >
/**
用户类型
*/
private String user = "" ;
/** 用户类型列表 */
private List userList = null ;
getter(.)
setter(.)
action
private String user = "" ;
/** 用户类型列表 */
private List userList = null ;
getter(.)
setter(.)
UpdatePermissionForm update
=
(UpdatePermissionForm)form;
ArrayList userList = new ArrayList();
userList.add( new LabelValueBean( " haha " , " 1 " ));
userList.add( new LabelValueBean( " dada " , " 2 " ));
userList.add( new LabelValueBean( " xiaoxiao " , " 3 " ));
request.setAttribute( " userList " , userList);
System.out.println(update.getUser());//结果输出为1,2,3
ArrayList userList = new ArrayList();
userList.add( new LabelValueBean( " haha " , " 1 " ));
userList.add( new LabelValueBean( " dada " , " 2 " ));
userList.add( new LabelValueBean( " xiaoxiao " , " 3 " ));
request.setAttribute( " userList " , userList);
System.out.println(update.getUser());//结果输出为1,2,3