I can not export data from my table, even following the example of Primefaces Showcase . I use version 5.0.
<h:commandLink><p:graphicImagelibrary="img" name="xlsx.png" width="32" title="Exportar para Excel"/>
<p:dataExporter type="xlsx" target="dataTable" fileName="Relatorio" />
</h:commandLink>
<h:commandLink>
<p:graphicImage library="img" name="pdf.png" width="37" title="Exportar para PDF"/>
<p:dataExporter type="pdf" target="dataTable" fileName="Relatorio"/>
</h:commandLink>
<p:dataTable var="r" value="#{controleBean.reservatorios}"
paginator="true" rows="30" id="dataTable"
emptyMessage="Nenhum Reservatorio Cadastrado"
paginatorPosition="bottom"
selection="#{controleBean.reservatorioSelecao}"
selectionMode="single" rowKey="#{r.idReservatorio}">
<p:ajax event="rowSelect"
update=":form:btnEditar :form:btnExcluir" />
<p:ajax event="rowUnselect"
update=":form:btnEditar :form:btnExcluir" />
<p:column headerText="Nome">
<h:outputText value="#{r.nomeReservatorio}" />
</p:column>
<p:column headerText="Capacidade (Lt)">
<h:outputText value="#{r.capacidadeReservatorio}" />
</p:column>
<p:column headerText="Tipo">
<h:outputText value="#{r.tipoReservatorio}" />
</p:column>
<p:column headerText="Observação">
<h:outputText value="#{r.obsReservatorio}" />
</p:column>
</p:dataTable>