简体   繁体   中英

How to export data with lazy loading page table in PrimeFaces?

I have <p:dataTable lazy="true" ... /> and I want to be able to export the current page with <p:dataExporter .. /> . If my my total rows count is 12 and my page size is 10, I have two pages. The first page has 10 rows, the second page - 1 row. When I click export and I am on the first page I get 11 rows exported in excel (the first row is duplicated on first and last position). Also if I go to the second page, where I have only 1 row and click export the excel contains 1 row on first position, 9 empty lines and the same row on position 11. Which is very odd.

您需要版本3.0.M4来执行此操作。

What Primefaces Version do you use?

It works fine on lab-showcase: http://www.primefaces.org/showcase-labs/ui/exporter.jsf

Have you tried exporting all data(instead of page data) to see what happens? Also try the page export in CSV or even PDF.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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