简体   繁体   English

从JSF Primefaces Datatable页面明智地打印数据

[英]Printing data from JSF Primefaces Datatable page wise

I am working with Primefaces Datatable showing paginated results with 100 records per page. 我正在使用Primefaces Datatable显示每页100条记录的分页结果。 I would like to add print functionality to it page wise, for example if user is on 4th page he will be shown records from 301-400, and if he selects for print option only that page/records should get print. 我想在页面上为其添加打印功能,例如,如果用户在第4页上,将显示301-400的记录,并且如果他选择打印选项,则仅该页面/记录应该得到打印。

Any idea how it can be achieved. 任何想法如何实现。 I tried using but it just displays the visible part of the Datatable not all the (scrolled down) records. 我尝试使用,但它只是显示数据表的可见部分,而不是所有(向下滚动)的记录。

Just figured out the option of using Dataexporter with pageOnly tag, 刚刚想出了将Dataexporter与pageOnly标记一起使用的选项,

<p:dataExporter type="pdf" target="aTable" fileName="audit_list" pageOnly="true"/>  

Needs to improve on the output more with formatting 需要通过格式化进一步改善输出

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM