Monday, 9 September 2013

primefaces dataexporter not working

primefaces dataexporter not working

i encounter with problem to export datatable to pdf. I use:
<primeFacesVersion>3.5</primeFacesVersion>
and:
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.7</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.lowagie</groupId>
<artifactId>itext</artifactId>
<version>2.1.7</version>
<scope>provided</scope>
</dependency>
in xhtml:
<h:form id="listForm">
<h:panelGrid width="100%" columns="1">
<p:dataTable id="listTable" var="employee"
value="#{employeeBean.result}" paginator="true"
dynamic="true"
rows="10" rowKey="#{item.id}" rowIndexVar="i"
selection="#{employeeBean.selected}"
emptyMessage="#{label['no.record.found']}"
sortDescMessage="#{label['sort.desc.message']}"
paginatorPosition="bottom"
sortAscMessage="#{label['sort.asc.message']}"
update="listTable">
.....
<h:commandLink value="#{label['PDF']}" ajax="false" icon="excel-icon">
<p:dataExporter type="pdf" target="listTable" fileName="emplList"/>
</h:commandLink>
</h:form>
It is not work an throw this exception:
SEVERE: Servlet.service() for servlet [Faces Servlet] in context with path
[] threw exception [com/lowagie/text/Phrase] with root cause
java.lang.ClassNotFoundException: com.lowagie.text.Phrase

No comments:

Post a Comment