Html 如何在dataTable中将多行合并为一行
我正在使用JSF2.0创建一个页面,其中显示了所有的图像。 我使用的代码是:Html 如何在dataTable中将多行合并为一行,html,jsf,jsf-2,datatable,Html,Jsf,Jsf 2,Datatable,我正在使用JSF2.0创建一个页面,其中显示了所有的图像。 我使用的代码是: <h:dataTable id="imageList3" value="#{PersonalInformationDataBean.loadReviewReportDataById()}" var="reviewMyList" width="100%" border="1"> <h:column> <h:graphicImage value="Di
<h:dataTable id="imageList3" value="#{PersonalInformationDataBean.loadReviewReportDataById()}" var="reviewMyList" width="100%" border="1">
<h:column>
<h:graphicImage
value="DisplayImage?mainID=reviewReport&id=#{reviewMyList.drawingId}"
/>
</h:column>
</h:dataTable>
如果不清楚,请告诉我。您可以将四个
和单个h:graphicImage
放在每个h:graphicImage
中,或将四个h:graphicImage
放在一个
您可以修改对象(reviewMyList)以容纳最多3个内部对象,您可以在每个列中访问这些对象,如
reviewMyList.first.drawingId
reviewMyList.second.drawingId
reviewMyList.third.drawingId
当然,您必须添加
rendered=“reviewMyList.first ne null”
rendered=“reviewMyList.second ne null”
rendered=“reviewMyList.third ne null”
再次感谢您的回答。我会研究一下,然后再给你们回复。我已经包含了四个h:列,但问题是数据表的行为和FOR循环类似。因为DB中有9行,所以我得到了9行。对于id=#{reviewMyList.drawingId}
,如何将它们设置为具有不同id的3行。对于每个h:列,我必须更改每个graphicImage的id。希望你明白我的意思…好吧,你可以修改你的对象(reviewMyList)以容纳最多3个内部对象,你可以在每个列中访问它们,比如reviewMyList.first.drawingId
reviewMyList.second.drawingId
reviewMyList.third.drawingId
,当然你必须添加=“reviewMyList.first ne null”
rendered=“reviewMyList.second ne null”
rendered=“reviewMyList.third ne null”
到您的
+++++++++++++++++++++++++++++++++++++++++
+ Image 1 + Image 2 + Image 3 + Image 4 +
+ Image 5 + Image 6 + Image 7 + Image 8 +
+ Image 9 + + + +
+++++++++++++++++++++++++++++++++++++++++