我正在使用spring mvc portlet作为我的一个应用程序。在使用Controller中的List集合绑定动态填充列表框时遇到问题。spring portlet mvc form:select bind to list
Conference.java:
public class Conference {
private List<Patient> scheduledPatients;
//getter/setter for scheduledPatients
}
saveParticipants.jsp
<form:select path="scheduledParticipants" items="${scheduledParticipants}" itemLabel="name" itemValue="name" />
的scheduledParticipants列表数据填充有来自另一列表框中选择的数据并移动到scheduledParticipants列表框。
在提交操作请求时,我无法获取在控制器操作映射中绑定的新填充的scheduledParticipants。 ModelAttribute是会议pojo。
我们使用InitBinder将数据绑定到scheduledParticipants。 仍然我无法获取控制器上选定的参与者数据。
有谁知道如何做到这一点?