我正在尝试从 jsp 页面访问多个复选框值..但我最终得到了错误的绑定..
jsp页面:
<c:forEach items="${employees}" var="employee">
<tr>
<td><spring:checkbox path="selectedMails" value="<c:out value='${employee.emailid}'/>"/> </td>
<td><spring:label path="employeeId">${employee.employeeId}</spring:label></td>
<td><spring:label path="employeeName">${employee.employeeName}</spring:label></td>
<td><spring:label path="emailid" >${employee.emailid}</spring:label></td>
<td><spring:label path="reportmanager">${employee.reportmanager}</spring:label></td>
</tr>
</c:forEach>
页面
//Invitation Beans
private String [] selectedMails;
public String [] getSelectedMails() {
return selectedMails;
}
public void setSelectedMails(String [] selectedMails) {
this.selectedMails = selectedMails;
}
我可以${employee.emailid}
在jsp页面上打印..但我无法返回,我需要保存多个值..请帮帮我