JSP中迭代这个对象sequences的List集合,?那里我需要展示出另一个对象中的属性,他们之间的关系就是一对多的关系,sequence中有一个set集合,如下! <s:iterator value="#request.sequences" var="item">
<tr>
<th style="width:20px"><input type="checkbox" name="ids" value="${item.sequenceId }"></th>
<td>${item.accession }</td>
<td>${item.sequenceType }</td>
<td>${item.host }</td>
<td>${item.genotype }</td>
<td>${item.subtype }</td>
<td>${item.serotype }</td>
<td>${item.subGenomicRegion }</td>
<td>${item.length }</td>
<td>${item.proteinName }</td>
<td>
??????
</td>
</tr>
</s:iterator>实体类如下
public class TbSequence implements java.io.Serializable { private Integer sequenceId;
private String sequenced;
private TbUser tbUserByUpdatedId;
private TbUser tbUserByCreatedId;
private TbClinicPatientBasicInfo tbClinicPatientBasicInfo;
private TbClinicTherapy tbClinicTherapy;
private String accession;
private String molecularType;
private Set<TbSequencePubinfo> tbSequencePubinfos = new HashSet<TbSequencePubinfo>(
0);
private Set<TbSequenceFavorite> tbSequenceFavorites = new HashSet<TbSequenceFavorite>(
0);
private Set<TbSample> tbSamples = new LinkedHashSet<TbSample>(0);
上面???这个地方就是要填入这个实体类中tbSequencePubinfos set集合中属性。请问怎么写....
action中我查询的是sequences这个实体类的List,javajspstringhtml
<tr>
<th style="width:20px"><input type="checkbox" name="ids" value="${item.sequenceId }"></th>
<td>${item.accession }</td>
<td>${item.sequenceType }</td>
<td>${item.host }</td>
<td>${item.genotype }</td>
<td>${item.subtype }</td>
<td>${item.serotype }</td>
<td>${item.subGenomicRegion }</td>
<td>${item.length }</td>
<td>${item.proteinName }</td>
<td>
??????
</td>
</tr>
</s:iterator>实体类如下
public class TbSequence implements java.io.Serializable { private Integer sequenceId;
private String sequenced;
private TbUser tbUserByUpdatedId;
private TbUser tbUserByCreatedId;
private TbClinicPatientBasicInfo tbClinicPatientBasicInfo;
private TbClinicTherapy tbClinicTherapy;
private String accession;
private String molecularType;
private Set<TbSequencePubinfo> tbSequencePubinfos = new HashSet<TbSequencePubinfo>(
0);
private Set<TbSequenceFavorite> tbSequenceFavorites = new HashSet<TbSequenceFavorite>(
0);
private Set<TbSample> tbSamples = new LinkedHashSet<TbSample>(0);
上面???这个地方就是要填入这个实体类中tbSequencePubinfos set集合中属性。请问怎么写....
action中我查询的是sequences这个实体类的List,javajspstringhtml
解决方案 »
- 高手来帮帮忙啊。急啊
- jstl-api-1.2.jar和jstl-impl-1.2.jar
- struts2配置问题?只要一配置WEB.XML就立马404,高手指点啊!
- jspSmartUpload 上传问题
- 着急啊 surtus2所有的包都引了 但是找不到 FilterDispatcher 希望高人帮忙解决
- tomcat的项目为什么不能直接引用其他项目中的类呀
- STRUTS框架不能创建FORMBEAN错误
- jboss和tomcat是什么关系
- 对虚拟主机感兴趣的请进
- 请问,IBM的MQSERIRS和JMS的关系是什么,谢谢????
- Jetty 怎么接收客户端post传过来的数据?(http)
- swing中JTextField输入的中文,存到Mysql中全变成问号了
为tbSequencePubinfos 定义get方法,然后
在你上面代码的iterator迭代器里面继续迭代
<s:iterator value="getTbSequencePubinfos()">
<s:iterator value="#item.tbSequencePubinfos">
</s:iterator>