<s:iterator value="listTree">
<tr>
<td>
<input type="checkbox" name="cb" value="<s:property value="cs.cid"/>" />
<s:property value="cs.cname" />
</td>
</tr>
</s:iterator>
private String[] cb;
public String[] getCb() {
return cb;
}
public void setCb(String[] cb) {
this.cb = cb;
}
//批量
public String batchAddStudents() {
System.out.println("cb.length:"+cb.length);
for(int i=0;i<cb.length;i++){
list.add(this.service.findById(Integer.parseInt(cb[i])));
}
return SUCCESS;
}
public String batchAddStudents() {
List<Integer> ids = new ArrayList<Integer>();
ids.add(id);
studentService.saveStudentCourse(ids);
return SUCCESS;
}