Understanding and implementing fully controlled custom exporter
The custom exporter provides full control to the developer for making the changes according to his requirements and design. You can implement the custom requirements in both PDFExporter
and ExcelExporter
implementations.
You have to use the Service Loader concept throughout the application to implement the custom exporter feature.
Proceed with the following steps to implement the custom exporter feature:
Create the
META-INF
folder under the classpath resources folder and create the services folder under theMETA-INF
folder by navigating to Resources | META-INF | Services.Create the
ExporterFactory
file with the full absolute path asorg.primefaces.extensions.component.exporter.ExporterFactory
.Add the implementation class of ExporterFactory in the web project.
For example, the JobHub application provided CustomExporterFactory as an implementation of ExporterFactory.
In the following code, you will call either default or custom file...