I have the following problem:
I get false / true values from my database in form of „0“ and „1“ strings.
Because I want to be nice :-) to my users, the output in my datatable shouldn't be zeros and ones.
So I use a graphic which represents the states zero and one.
I do it like this (inside p:datatable):
<p:column width="50" sortBy="#{report.arrived}">
<f:facet name="header">Report?</f:facet>
<p:graphicImage library="images"
name="#{report.arrived}.gif" />
</p:column>
So 0.gif is shown for false and 1.gif for true.
It looks like this:
My problem with the dataexporter from primefaces is that this column will be exported as
org.primefaces.component.graphicimage.GraphicImage@26bbdbd
Is there a way to change the exported value? Any ideas how I could get a graphical image and exporting the value?
I appreciate your help!
Specs: JBoss 7.1 JSF 2.0 Primefaces 3.5
EDIT:
Solved, smiliar to this solution, thx to BalusC !