我有 2 个数据表:
<p:dataTable id="tbl1" var="prop1" value="#{bean.prop1}" rendered="#{bean.listP1.size() != 0}">
// ...
</p:dataTable>
Run Code Online (Sandbox Code Playgroud)
和
<p:dataTable id="tbl2" var="prop2" value="#{bean.prop2}" rendered="#{bean.listP2.size() != 0}">
// ...
</p:dataTable>
Run Code Online (Sandbox Code Playgroud)
在 XHTML 页面上,经过一些操作,我得到了正确的结果,具体取决于listP1和listP2.
我的问题是点击导出按钮后
<h:commandLink>
<p:graphicImage value="/resources/icons/download.png" style="width : 35px; height:35px"/>
<pe:exporter type="pdf" target="tbl1, tbl2" fileName="SurveyResults"/>
</h:commandLink>
Run Code Online (Sandbox Code Playgroud)
我得到了错误的结果:我得到了两张桌子而不是一张桌子,因为其中一张是 size = 0
你对解决这个问题有什么想法吗?