title: Why my <p:dataExporter> doesn't work?
body: <p>I made my code like de PF Showcase, but it does't works... When i click my <code>commandLink</code> nothing happens. Anyone can help me? I already added Apache POI and iText.</p>
  
  <p><a href="https://i.stack.imgur.com/IOpjT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IOpjT.png" alt="enter image description here"></a></p>
  
  <pre><code>        &lt;h:form id="form"&gt;
              &lt;p:commandButton value="Novo" icon="ui-icon-document"
                  actionListener="#{controleBean.novoReservatorio()}" process="@this"
                  update="dataTable reservatorio-dialog"
                  oncomplete="PF('reservatorioDialog').show()" class="botaoDataTable"&gt;
                  &lt;p:resetInput target="reservatorio-dialog" /&gt;
              &lt;/p:commandButton&gt;
  
              &lt;p:commandButton icon="ui-icon-pencil" id="btnEditar" title="Editar"
                  disabled="#{controleBean.reservatorio == null}"
                  class="botaoDataTable" process="@this" update="dataTable :form"
                  oncomplete="PF('reservatorioDialog').show()"&gt;
                  &lt;p:resetInput target="reservatorio-dialog" /&gt;
                  &lt;f:setPropertyActionListener target="#{controleBean.reservatorio}"
                      value="#{controleBean.reservatorioSelecao}" /&gt;
              &lt;/p:commandButton&gt;
  
              &lt;p:commandButton icon="ui-icon-trash" id="btnExcluir"
                  title="Excluir" disabled="#{controleBean.reservatorio == null}"
                  class="botaoDataTable" action="#{controleBean.excluirReservatorio}"
                  process="@this" update="dataTable btnExcluir btnEditar" /&gt; 
  
              &lt;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}"&gt; 
  
                  &lt;p:ajax event="rowSelect"
                      update=":form:btnEditar :form:btnExcluir" /&gt;
                  &lt;p:ajax event="rowUnselect"
                      update=":form:btnEditar :form:btnExcluir" /&gt;
  
                  &lt;p:column headerText="Nome"&gt;
                      &lt;h:outputText value="#{r.nomeReservatorio}" /&gt;
                  &lt;/p:column&gt;
  
                  &lt;p:column headerText="Capacidade (Lt)"&gt;
                      &lt;h:outputText value="#{r.capacidadeReservatorio}" /&gt;
                  &lt;/p:column&gt;
  
                  &lt;p:column headerText="Tipo"&gt;
                      &lt;h:outputText value="#{r.tipoReservatorio}" /&gt;
                  &lt;/p:column&gt;
  
                  &lt;p:column headerText="Observação"&gt;
                      &lt;h:outputText value="#{r.obsReservatorio}" /&gt;
                  &lt;/p:column&gt;
              &lt;/p:dataTable&gt;
  
              &lt;p:commandLink&gt;
                  &lt;p:graphicImage library="img" name="xlsx.png" width="32" title="Exportar para Excel"/&gt;
                  &lt;p:dataExporter type="xls" target="dataTable" fileName="Relatorio" /&gt;
              &lt;/p:commandLink&gt; 
  
              &lt;h:commandLink&gt;
                  &lt;p:graphicImage library="img" name="pdf.png" width="37" title="Exportar para PDF"/&gt;
                  &lt;p:dataExporter type="pdf" target="dataTable" fileName="Relatorio"/&gt;
              &lt;/h:commandLink&gt;
  
              &lt;p:commandButton value="Exportar para PDF" ajax="false"&gt;
                  &lt;p:dataExporter type="pdf" target=":form:dataTable" fileName="dataTable" /&gt;
              &lt;/p:commandButton&gt;
  
              &lt;p:dialog header="Reservatório" widgetVar="reservatorioDialog"
                  id="reservatorio-dialog" resizable="false" modal="true"
                  closeOnEscape="true"&gt;
                  &lt;p:messages style="font-size:70%;" /&gt;
  
                  &lt;p:panelGrid styleClass="semBorda"&gt;
                      &lt;p:row&gt;
                          &lt;p:column&gt;
                              &lt;h:outputLabel for="nomeReservatorio" value="* Nome: "
                                  class="componentePF label" /&gt;
                          &lt;/p:column&gt;
                          &lt;p:column&gt;
                              &lt;p:inputText id="nomeReservatorio" required="true"
                                  value="#{controleBean.reservatorio.nomeReservatorio}"
                                  requiredMessage="É necessário atribuir um nome à reservatorio"
                                  class="componentePF text" /&gt;
                          &lt;/p:column&gt;
                      &lt;/p:row&gt;
  
                      &lt;p:row&gt;
                          &lt;p:column&gt;
                              &lt;h:outputLabel for="capacidadeReservatorio"
                                  value="* Capacidade (Lt): " class="componentePF label" /&gt;
                          &lt;/p:column&gt;
                          &lt;p:column&gt;
                              &lt;p:spinner id="capacidadeReservatorio" size="30"
                                  value="#{controleBean.reservatorio.capacidadeReservatorio}"
                                  min="0" stepFactor="1" required="true"
                                  requiredMessage="É necessário atribuir uma capacidade à reservatorio"
                                  class="componentePF text" /&gt;
                          &lt;/p:column&gt;
                      &lt;/p:row&gt;
  
                      &lt;p:row&gt;
                          &lt;p:column&gt;
                              &lt;h:outputLabel for="tipoReservatorio"
                                  value="* Tipo de Reservatório: " class="componentePF label" /&gt;
                          &lt;/p:column&gt;
                          &lt;p:column&gt;
                              &lt;p:selectOneMenu id="tipoReservatorio"  style="font-size:75% !important;"
                                  value="#{controleBean.reservatorio.tipoReservatorio}"
                                  class="componentePF text bold" required="true"
                                  requiredMessage="É necessário atribuir um tipo ao reservatório"&gt;
                                  &lt;f:selectItem itemLabel="Escolha um Tipo para o Reservatório"
                                      noSelectionOption="true" /&gt;
                                  &lt;f:selectItem itemLabel="Escoamento" itemValue="Escoamento" /&gt;
                                  &lt;f:selectItem itemLabel="Reserva" itemValue="Reserva" /&gt;
                              &lt;/p:selectOneMenu&gt;
  
                          &lt;/p:column&gt;
                      &lt;/p:row&gt;
  
                      &lt;p:row&gt;
                          &lt;p:column&gt;
                              &lt;h:outputLabel for="obsReservatorio" value="Observação: "
                                  class="componentePF label" /&gt;
                          &lt;/p:column&gt;
                          &lt;p:column&gt;
                              &lt;p:inputText id="obsReservatorio"
                                  value="#{controleBean.reservatorio.obsReservatorio}"
                                  class="componentePF text" /&gt;
                          &lt;/p:column&gt;
                      &lt;/p:row&gt;
  
                      &lt;p:row&gt;
                          &lt;p:column colspan="2"&gt;
                              &lt;p:commandButton value="Cadastrar" icon="ui-icon-disk"
                                  action="#{controleBean.cadastrarReservatorio}"
                                  id="cadastrarReservatorio" ajax="false"
                                  class="componentePF button" /&gt;
                          &lt;/p:column&gt;
                      &lt;/p:row&gt;
                  &lt;/p:panelGrid&gt;
              &lt;/p:dialog&gt;
          &lt;/h:form&gt;
  </code></pre>