issue with dataexporter

UI Components for JSF
Post Reply
crytex
Posts: 28
Joined: 06 Feb 2014, 18:55

17 Apr 2014, 20:57

i used the primefaces datatexporter to export the data from the datatable to a PDF file

i added the required jar file to the library but i get the data duplicated in the file

exemple, i have 5 rows in the datatable, after export i find in the PDF file 15 ROW that means the data is displayed 3 times

here is the pdf file: https://www.mediafire.com/?ol61j15ra8kya83

User avatar
sudheer
PrimeFaces Core Developer
Posts: 4345
Joined: 16 Oct 2011, 19:19
Location: Singapore

17 Apr 2014, 22:14

Please post the code snippets.Otherwise there will be no clue for your issue.
Author,Speaker
https://twitter.com/sudheerjonna
Github: https://github.com/sudheerj
Website http://sudheerjonna.com/

___________________
Sudheer Jonna

crytex
Posts: 28
Joined: 06 Feb 2014, 18:55

17 Apr 2014, 22:24

-----------------
Last edited by crytex on 18 Apr 2014, 23:33, edited 1 time in total.

kukeltje
Expert Member
Posts: 9605
Joined: 17 Jun 2010, 13:34
Location: Netherlands

18 Apr 2014, 00:16

JSF/Java rule #1: Don't do any work in getters (or setters)... You getter is most likely called multiple times... Each time you add records to the list... A little debugging would have shown this.

User avatar
sudheer
PrimeFaces Core Developer
Posts: 4345
Joined: 16 Oct 2011, 19:19
Location: Singapore

18 Apr 2014, 05:41

kukeltje wrote:JSF/Java rule #1: Don't do any work in getters (or setters)... You getter is most likely called multiple times... Each time you add records to the list... A little debugging would have shown this.
Exactly.That is the reason for the multiple records in the export.
Author,Speaker
https://twitter.com/sudheerjonna
Github: https://github.com/sudheerj
Website http://sudheerjonna.com/

___________________
Sudheer Jonna

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: Bing [Bot] and 53 guests