How to override org.primefaces.extensions.component.exporter.ExporterFactoryProvider ?

Community Driven Extensions Project
Post Reply
Posts: 1
Joined: 29 Apr 2015, 17:10

19 Jan 2018, 18:13

Hi people,

I need your help to sort out a issue.

I´m trying to change the classes that creates Excel and PDF. These classes that creates those files needs to be changed from org.apache.poi.hssf.usermodel.HSSFXXXX to org.apache.poi.xssf.streaming.SXSSFXXXX
Because the SXSSF supports to write in file every 100 lines until end of dataTable. I need to implement it because sometimes the users needs to download huge xlsx file.
I need to override the export classes like when we override resource bundle messages.

If it is possible. I would like to override the primefaces classes in order to use it as main classes like getting the classes from the .jar of primefaces.
So if I do it I don´t need to change the <h:commandLink> I just call it as normal like that:

<p:graphicImage name="/demo/images/excel.png" width="24"/>
<p:dataExporter type="xls" target="tbl" fileName="cars" />

Thank you very much !

User avatar
Posts: 784
Joined: 22 Apr 2013, 15:48

19 Jan 2018, 19:22

Hmm I am not quite sure what you are asking. The only thing you can customize is this example: ... tTable.jsf

However if you want to replace core functionality I think you will just have to write your own Exporter code based on the PF code.
PrimeFaces Extensions Developer
GitHub Profile:
PrimeFaces Elite 6.2.10 / PF Extensions 6.2.9

Posts: 401
Joined: 28 Dec 2011, 17:44

13 Mar 2018, 11:36

I followed the instructions found for primefaces extension exporter. All i have to do was adding a org.primefaces.extensions.component.exporter.ExporterFactory file under META-INF/services and add the FQN of my own ExporterFactory, creating my own exporter instances.
Primefaces 6.1.8 (PF Extensions 6.1.5)
JSF: Mojarra 2.2 (Spec 2.2) - running on WildFly 10.1.0.Final

Post Reply

Return to “Extensions”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest