jsp
<html:form action="/updatePermission.do" method="post">
<html:multibox property="basicInfo" value="001"/>001<br/>
<html:multibox property="basicInfo" value="002"/>002<br/>
<html:multibox property="basicInfo" value="003"/>003<br/>
<html:submit /><br/>
</html:form>
form
// private String[] basicInfo = new String[0]; //表示默认都未选中
private String[] basicInfo = {"001","002"};//默认选中2项
public String[] getBasicInfo() {
return basicInfo;
}
public void setBasicInfo(String[] basicInfo) {
this.basicInfo = basicInfo;
}
action
UpdatePermissionForm update = (UpdatePermissionForm)form;
Object obj = update.getBasicInfo();
String[] biList = (String[])obj;
for(int i=0;i<biList.length;i++){
System.out.println(biList[i]);
}
posted on 2008-07-28 13:44
Hank1026 阅读(698)
评论(0) 编辑 收藏 所属分类:
每日积累