Set是,
Collection并且任何其他集合都可以通过属性建立索引。
@Element(value = Student.class)@Key(value = Integer.class)@KeyProperty(value = "id") @CreateIfNull(value = true)private Set<Student> students = new HashSet(0);//getter and setter, also for Student class that should have Integer id.
在JSP中
<s:iterator value="students " var="student"> <s:textfield name="students(%{#student.id}).name" /></s:iterator>
有关此内容的更多信息,请参见按该集合的属性对集合进行索引。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)