2

I am building a Java application using the JSF PrimeFaces library. I don't want to use an open source PDF library to generate reports. I have been trying to figure out to use PrimeFaces Extensions data exporter to generate a PDF file with many data tables. I am talking about this link: PrimeFaces Extensions

However, I am having problem with this particular piece of code:

<p:panel header="Export PDF">  

                 <p:commandLink id="pdf" ajax="false">  

                     <p:graphicImage value="/resources/images/pdf.png"/>  

                     <f:setPropertyActionListener value="false" target="#{exporterController.customExporter}" />  

                     <pe:exporter type="pdf" target="resumenTable,resumenTablePlan" fileName="example" datasetPadding="4"/>  

                 </p:commandLink>  

            </p:panel>  

I can't seem to find the implementation of #{exporterController.customExporter}

Could somebody please guide me so that I can find the implementation of the customerExporter method?

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
Erick
  • 823
  • 16
  • 37

1 Answers1

3

While Primefaces extensions showcase did not show ExporterController source in here there is no need for alarm as

<f:setPropertyActionListener value="false" target="#{exporterController.customExporter}" />

just sets Boolean value customExporter in ExporterController bean as false.

Anyways, the source for ExporterController is here.

The full source code for extensions is here

You can request Oleg here in the comments section and he will gladly add this to showcase managed bean tab in case any other user is also confused.

  • I haven't tred it out. What I know is that I included the and it gave me an error saying that it can't find that class. But I will try to remove it and see what happends. – Erick Dec 01 '15 at 20:38
  • I will check and I will let you know – Erick Dec 01 '15 at 20:43
  • I removed the line and clicked on the pdf link and it is doing nothing. It is not downloading the pdf. There is something that my controller class needs to do that I am missing – Erick Dec 01 '15 at 23:09
  • I had a problem on my class path, indeed. I am able to download the pdf now. To your point, you did answer my question so there you go. – Erick Dec 01 '15 at 23:17