I'm trying to display a list of images using hx:graphicImageEx and h:dataTable components.
<h:dataTable value="#{signature.imageList}" var="signatureImage">
<h:column>
<hx:graphicImageEx value="#{signatureImage.data}" mimeType="image/*" />
<h:outputText value="#{signatureImage.data[0]}"/>
<hx:graphicImageEx value="#{signature.imageList[0].data}" mimeType="image/*" />
</h:column>
</h:dataTable>
#{signature.imageList} represents an arraylist of type Image
public class Image {
private String id;
private String type;
private byte[] data;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public byte[] getData() {
return data;
}
public void setData(byte[] data) {
this.data = data;
}
}
The problem is with
<hx:graphicImageEx value="#{signatureImage.data}" mimeType="image/*" />
which doesn't display the image represented by byte array .
The strange point is that:
<h:outputText value="#{signatureImage.data[0]}"/>
displays the first byte of the byte array correctly !
and
<hx:graphicImageEx value="#{signature.imageList[0].data}" mimeType="image/*" />
displays the first image of the image list correctly !
I don't know if the issue is with the data table or with hx:graphicImageEx !
Please help, I would appreciate any help from you
Thanks
{code}