DataExporter does not export correctly Header in PDF and XLS file format.
My library versions
- Primefaces 3.0.1
- Poi 3.7
- IText 2.1.7
I've tried with other versions without success. The following code snippet.
Code: Select all
DataExporter
<p:panel style="border:none;">
<h:commandLink style="margin-right:5px;">
<p:graphicImage value="#{resource['images/icons/ico_excel.png']}" width="24"/>
<p:dataExporter type="xls" target="tb-agenda" fileName="name_fila" />
</h:commandLink>
<h:commandLink style="margin-right:5px;">
<p:graphicImage value="#{resource['images/icons/ico_pdf.png']}" width="24"/>
<p:dataExporter type="pdf" target="tb-agenda" fileName="name_file" />
</h:commandLink>
</p:panel>
DataTable
<p:dataTable id="table_id"
value="#{Bean.method}"
var="result" paginator="true" paginatorPosition="bottom"
rows="10" paginatorAlwaysVisible="true"
paginatorTemplate="{FirstPageLink} {PreviousPageLink} {CurrentPageReport} {NextPageLink} {LastPageLink}">
<p:column>
<f:facet name="header">
<h:outputText value="Columun Name" />
</f:facet>
<h:outputLabel value="#{result.parameter}" />
</p:column>
<p:dataTable />
Many thanks,
Rober