DataExporter doesn't show icons

UI Components for JSF
mengerg
Posts: 12
Joined: 13 Jan 2014, 17:45

26 Jun 2014, 16:33

The code below does show the commandbutton icon per line, but for the exporters, only the text "{Exporters}" is shown, not the two icons. The paginator icons do show correctly. I checked the presence of the xls and pdf icon by using them in the commandbutton.
<p:dataTable
id="pdmOrders"
rows="#{gui.rowsPerPage_pdmOrders}"
value="#{pdmOrdersView.pdmOrders}"
var="pdmOrderObject"
binding="#{pdmOrdersView.dataTable}"
paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {Exporters}"
paginator="true"
styleClass="tableFont"
style="margin-bottom:20px">
<f:facet name="{Exporters}">
<h:commandLink>
<p:graphicImage name="/resources/images/xlsx-24_32.png" width="24"/>
<p:dataExporter type="xls" target="pdmOrders" fileName="orders" />
</h:commandLink>
<h:commandLink>
<p:graphicImage name="/resources/images/pdf-24_32.png" width="24"/>
<p:dataExporter type="pdf" target="pdmOrders" fileName="orders" />
</h:commandLink>
</f:facet>
<p:column
styleClass="left nowrap">
<f:facet name="header">
<h:outputText
value="#{rb.actions}" />
</f:facet>
<h:commandButton
title="#{rb.showPdmOrder}"
image="/resources/images/application_cascade.png"
id="showPdmOrderDetailsButton"
value="#{rb.showPdmOrderButton}"
action="#{pdmOrdersView.showPdmOrder}" />&nbsp;
</p:column>

Regards,
Gerard

User avatar
sudheer
PrimeFaces Core Developer
Posts: 4345
Joined: 16 Oct 2011, 19:19
Location: Singapore

26 Jun 2014, 17:53

Make sure you have single space between {Exporters} and {LastPageLink}.And this feature available only in PF 5.1,5.0.2 and 4.0.15 releases.
Author,Speaker
https://twitter.com/sudheerjonna
Github: https://github.com/sudheerj
Website http://sudheerjonna.com/

___________________
Sudheer Jonna

mengerg
Posts: 12
Joined: 13 Jan 2014, 17:45

20 Aug 2014, 14:11

sudheer wrote:Make sure you have single space between {Exporters} and {LastPageLink}.And this feature available only in PF 5.1,5.0.2 and 4.0.15 releases.
I've subscribed to Elite, downloaded and installed 502 and 506, checked the single space as advised, but still no icon for XLS is visible.

Kind Regards
Gerard

User avatar
sudheer
PrimeFaces Core Developer
Posts: 4345
Joined: 16 Oct 2011, 19:19
Location: Singapore

20 Aug 2014, 14:30

But it is not replicated in the showcase.Please make sure you don't have older jars.
Author,Speaker
https://twitter.com/sudheerjonna
Github: https://github.com/sudheerj
Website http://sudheerjonna.com/

___________________
Sudheer Jonna

mengerg
Posts: 12
Joined: 13 Jan 2014, 17:45

20 Aug 2014, 17:00

sudheer wrote:But it is not replicated in the showcase.Please make sure you don't have older jars.
OK, got the diusplay right now. Exporter works ! But the icon is immediately after the navigation buttons and not, as in the showcase, at the far right above the table. Is there some CSS trick to get this done ?

Kind regards,
Gerard

mengerg
Posts: 12
Joined: 13 Jan 2014, 17:45

20 Aug 2014, 17:03

mengerg wrote:
sudheer wrote:But it is not replicated in the showcase.Please make sure you don't have older jars.
OK, got the diusplay right now. Exporter works ! But the icon is immediately after the navigation buttons and not, as in the showcase, at the far right above the table. Is there some CSS trick to get this done ?

Kind regards,
Gerard
Sorry, got that all right too ! CSS trick found. Thank you for all your help !!!
Works great !!!

User avatar
sudheer
PrimeFaces Core Developer
Posts: 4345
Joined: 16 Oct 2011, 19:19
Location: Singapore

21 Aug 2014, 09:38

Glad to hear it works.BTW,why you didn't get the images initially?
Author,Speaker
https://twitter.com/sudheerjonna
Github: https://github.com/sudheerj
Website http://sudheerjonna.com/

___________________
Sudheer Jonna

mengerg
Posts: 12
Joined: 13 Jan 2014, 17:45

21 Aug 2014, 13:15

sudheer wrote:Glad to hear it works.BTW,why you didn't get the images initially?
I think the whol issue was caused by the fact that I hadn't installed the required POI and iText JAR's. After I did that, it all worked fine. Maybe it is an idea to add a paragraph to the DataExplorer chapter (and others perhaps) that sums up all requirements for the component. The general location for dependencies in the manual is overlooked easily :-)

User avatar
sudheer
PrimeFaces Core Developer
Posts: 4345
Joined: 16 Oct 2011, 19:19
Location: Singapore

21 Aug 2014, 15:20

mengerg wrote:
sudheer wrote:Glad to hear it works.BTW,why you didn't get the images initially?
I think the whol issue was caused by the fact that I hadn't installed the required POI and iText JAR's. After I did that, it all worked fine. Maybe it is an idea to add a paragraph to the DataExplorer chapter (and others perhaps) that sums up all requirements for the component. The general location for dependencies in the manual is overlooked easily :-)
Adding iText and POI dependencies is a mandatory requirement if you use dataExporter component.It is been mentioned in user guide as well.
Author,Speaker
https://twitter.com/sudheerjonna
Github: https://github.com/sudheerj
Website http://sudheerjonna.com/

___________________
Sudheer Jonna

mengerg
Posts: 12
Joined: 13 Jan 2014, 17:45

21 Aug 2014, 15:39

sudheer wrote:
mengerg wrote:
sudheer wrote:Glad to hear it works.BTW,why you didn't get the images initially?
I think the whol issue was caused by the fact that I hadn't installed the required POI and iText JAR's. After I did that, it all worked fine. Maybe it is an idea to add a paragraph to the DataExplorer chapter (and others perhaps) that sums up all requirements for the component. The general location for dependencies in the manual is overlooked easily :-)
Adding iText and POI dependencies is a mandatory requirement if you use dataExporter component.It is been mentioned in user guide as well.
Agree ! But who reads the entire manual :-) The average developer will check the DataExporter chapter and starts working. It would be nice if that chapter would explicitly mention that some extra's must be installed to get it working :-)

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 53 guests