Note that there are some explanatory texts on larger screens.

plurals
  1. POPrimeFaces 3.2 dataExporter not working
    primarykey
    data
    text
    <p>I am using PrimeFaces 3.2 and want to export a dynamically created table as an .xls file. When i click on export, nothing seems to be happening.</p> <p><strong>Export Code</strong></p> <pre><code>&lt;h:commandLink id="Download_Excel_Format" ajax="false"&gt; &lt;p:graphicImage value="/resources/Excel_Icon.jpg" height="25" width="25" /&gt; &lt;p:dataExporter type="xls" target="dataTable" fileName="SomeFileName"/&gt; &lt;/h:commandLink&gt; </code></pre> <p><strong>dataTable</strong></p> <pre><code>&lt;p:dataTable id="dataTable" var="c" value="#{databaseSearch.customerList}" paginator="true" rows="10" paginatorAlwaysVisible="false" paginatorTemplate="Page {CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} Rows per page {RowsPerPageDropdown}" rowsPerPageTemplate="5,10,15,30"&gt; &lt;p:column&gt; &lt;f:facet name="header"&gt; &lt;h:outputText value="Machine" /&gt; &lt;/f:facet&gt; &lt;p:commandButton id="basic" value="#{c.machine}" action="#{updateEntry.setMachine(c.machine)}" oncomplete="dlg1.show();" styleClass="ui-Machinebutton" update=":Update_Entry"/&gt; &lt;p:tooltip for="basic" value="Update/Delete Database Entry" showEffect="fade" hideEffect="fade" /&gt; &lt;/p:column&gt; &lt;p:column&gt; &lt;f:facet name="header"&gt; &lt;h:outputText value="Company" /&gt; &lt;/f:facet&gt; &lt;h:outputText value="#{c.company}" /&gt; &lt;/p:column&gt; &lt;p:column&gt; &lt;f:facet name="header"&gt; &lt;h:outputText value="Contact" /&gt; &lt;/f:facet&gt; &lt;h:outputText value="#{c.contact}" /&gt; &lt;/p:column&gt; &lt;p:column&gt; &lt;f:facet name="header"&gt; &lt;h:outputText value="Phone" /&gt; &lt;/f:facet&gt; &lt;h:outputText value="#{c.phone}" /&gt; &lt;/p:column&gt; &lt;p:column&gt; &lt;f:facet name="header"&gt; &lt;h:outputText value="Email" /&gt; &lt;/f:facet&gt; &lt;!-- &lt;h:outputText value="#{c.email}" /&gt;--&gt; &lt;h:outputLink value="mailto:#{c.email}?Subject=Baseline Monitor Alert | Machine : #{c.machine}"&gt;#{c.email}&lt;/h:outputLink&gt; &lt;/p:column&gt; &lt;/p:dataTable&gt; </code></pre> <p>Both the dataTable and the Export command are within one form, however the dataTable is in a output panel (within the form).</p> <p><strong>Form</strong></p> <pre><code>&lt;h:form prependId="false" id="Main_Form"&gt; &lt;/h:form&gt; </code></pre> <p><strong>Output Panel</strong></p> <pre><code>&lt;p:outputPanel id="panel" autoUpdate="false"&gt; &lt;/p:outputPanel&gt; </code></pre> <p>I even updated to PrimeFaces 3.4.2 to see if the dataExporter would work, but no avail, as far as i remember 3.2 has a bug if the dataTable generates columns dynamically, but that is not the case here right? am i doing something wrong?</p> <p>dataExporter option looks much simpler, but if there is an alternative which is simple enough i am up for it.</p> <p><strong>Update</strong></p> <p>I am using a GlassFish 3.1.2.2 (build 5) &amp; NetBeans 7.2.1, i do not get any errors, just the page refresh's, has a '#' at the end of the URL and stops, no errors means that i am not lacking any dependencies either... so i am lost here ...</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload