Page 2 of 2

Re: pe:exporter, exclude facet or ui components inside facet

Posted: 18 Nov 2013, 13:05
by Marx
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.

Re: pe:exporter, exclude facet or ui components inside facet

Posted: 18 Nov 2013, 14:30
by sudheer
Please create an issue for this in extensions issue tracker.We will analyse and fix this issue.

Re: pe:exporter, exclude facet or ui components inside facet

Posted: 21 Nov 2013, 11:03
by Marx
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

Re: pe:exporter, exclude facet or ui components inside facet

Posted: 21 Nov 2013, 11:37
by sudheer
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.

Re: pe:exporter, exclude facet or ui components inside facet

Posted: 25 Nov 2013, 05:41
by sudheer
Done.This feature available in the 1.2.0 release and showcase skipComponents example added in columnsAlignments usecase.

Re: pe:exporter, exclude facet or ui components inside facet

Posted: 12 Jul 2014, 21:40
by pikijakob
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?

Re: pe:exporter, exclude facet or ui components inside facet

Posted: 16 Jul 2014, 15:46
by sudheer
Don't raise old threads.Better you can compare with showcase example code.

Re: pe:exporter, exclude facet or ui components inside facet

Posted: 11 Aug 2016, 22:30
by priyanka29
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.

Re: pe:exporter, exclude facet or ui components inside facet

Posted: 11 Aug 2016, 23:01
by priyanka29
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.

Re: pe:exporter, exclude facet or ui components inside facet

Posted: 14 Sep 2016, 08:27
by sudheer
You can check the below link for printing pdfhttp://forum.primefaces.org/viewtopic.php?f=3&t=34402