pe:exporter, exclude facet or ui components inside facet

Community Driven Extensions Project
Marx
Posts: 27
Joined: 16 Feb 2011, 14:43

18 Nov 2013, 13:05

I also need to exclude some content of header in export. My datatable have dropdown menu inside header, and it shouldn't be exported. As I see in code in Exporter.exportValue it handles many components, but makes simply toString for not covered. I think it would be usable to add attribute with list of components to skip.
So it would be

Code: Select all

<pe:export skipComponents="org.primefaces.component.menu.Menu,org.primefaces.component.panel.Panel" ...
and inside export method it would be one additional if:

Code: Select all

if (skipComponents.contains(component.getClass().getName())
  return "";
I think creating custom exporter for such a simple thing shouldn't be necessary.

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

18 Nov 2013, 14:30

Please create an issue for this in extensions issue tracker.We will analyse and fix this issue.
Author,Speaker
https://twitter.com/sudheerjonna
Github: https://github.com/sudheerj
Website http://sudheerjonna.com/

___________________
Sudheer Jonna

Marx
Posts: 27
Joined: 16 Feb 2011, 14:43

21 Nov 2013, 11:03

sudheer wrote:Please create an issue for this in extensions issue tracker.We will analyse and fix this issue.
done
https://github.com/primefaces-extension ... issues/191

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

21 Nov 2013, 11:37

Marx wrote:
sudheer wrote:Please create an issue for this in extensions issue tracker.We will analyse and fix this issue.
done
https://github.com/primefaces-extension ... issues/191
Thanks.We will check it.
Author,Speaker
https://twitter.com/sudheerjonna
Github: https://github.com/sudheerj
Website http://sudheerjonna.com/

___________________
Sudheer Jonna

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

25 Nov 2013, 05:41

Done.This feature available in the 1.2.0 release and showcase skipComponents example added in columnsAlignments usecase.
Author,Speaker
https://twitter.com/sudheerjonna
Github: https://github.com/sudheerj
Website http://sudheerjonna.com/

___________________
Sudheer Jonna

pikijakob
Posts: 3
Joined: 10 Jul 2014, 12:18

12 Jul 2014, 21:40

sudheer wrote:
rodmc wrote:sudheer i really need help here :(

this is what ive done by now:

1) under resources i created META-INF/services

2) inside services i created an empty text file called "Bean.ExporterFactory" (Bean is the package where my CustomExporterFactory is)

3) inside the file i added this line "Bean.CustomExporterFactory"

4) i created a java class (under my Bean package) called "CustomExporterFactory".

5) i made copy/paste of "DefaultExporterFactory" from here: https://github.com/primefaces-extension ... vider.java into my "CustomExporterFactory" class i created in step 4. (of course i changed the class name to "CustomExporterFactory"..

6) i created a java class called "PDFCustomExporter" under my "Bean" package, inside of it i made copy/paste of this: https://github.com/primefaces-extension ... orter.java

7) under META-INF/services i created a file called "Bean.PDFExporter" and inside of it i wrote Bean.PDFCustomExporter


8) now what? are all this steps ok by now? or im missing some steps ? i really have searched in this forum but everything regarding to the custom pdf exporter is so confusing and unclear that i dont know what to do.. i saw your other post about this but i did not understood anything.. i did all this trying to follow that post..

now how can i call my PDFCustomExporter from the view?? if i write pe:exporter.PDFCustomExporter it is not recognized and i did not understood very well the service loader stuff (yes i saw tha page explaining it, but i still dont get how to use it in this case)

pd. i also tried calling the files: org.primefaces.extensions.component.exporter.ExporterFactory and "Bean.CustomExporterFactory" inside the file

the other file org.primefaces.extensions.component.exporter.PDFExporter and inside "Bean.PDFCustomExporter".. but nothing..

please please help!! :cry:
see my response below

1) correct
2) wrong.file name should be "org.primefaces.extensions.component.exporter.ExporterFactory"
3)correct
4)correct
5)correct.And change the name of PDFExporter to PDFCustomExporter
6)correct
7)wrong.This step is not needed and shouldn't do that

Now your application will call your own custom export instead default export.I will add the showcase example soon (and becasue of work load I didn't get the time to do that).If you still facing issues then you can reach my account sudheer.jonna@gmail.com.
I follow this steps but when i try to export with CostumExporter I get ERROR: org.primefaces.extensions.component.exporter.ExporterFactory: Provider costum.CostumExporterFactory not a subtype.

Could you help me with this?
Primefaces 5.0 | PrimeFaces Extensions 2.0 | JBoss 7.1.3 | itext-2.1.7

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

16 Jul 2014, 15:46

Don't raise old threads.Better you can compare with showcase example code.
Author,Speaker
https://twitter.com/sudheerjonna
Github: https://github.com/sudheerj
Website http://sudheerjonna.com/

___________________
Sudheer Jonna

priyanka29
Posts: 3
Joined: 11 Aug 2016, 04:32

11 Aug 2016, 22:30

Hi Sudheer,

I am working on primefaces datatable and using <pe:exporter> for print in pdf format and followed the above steps which in this discussion, but dint work for me. Do you have any example. Thanks is advance.

priyanka29
Posts: 3
Joined: 11 Aug 2016, 04:32

11 Aug 2016, 23:01

Hi Sudheer,

I am working on primefaces datatable and using <pe:exporter> for print in pdf format and followed the above steps which in this discussion, but dint work for me. Do you have any example. Thanks is advance.

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

14 Sep 2016, 08:27

You can check the below link for printing pdfhttp://forum.primefaces.org/viewtopic.php?f=3&t=34402
Author,Speaker
https://twitter.com/sudheerjonna
Github: https://github.com/sudheerj
Website http://sudheerjonna.com/

___________________
Sudheer Jonna

Post Reply

Return to “Extensions”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 4 guests