Code: Select all
<p:graphicImage value="#{detailsBacking.photo1}" />
Code: Select all
private StreamedContent photo1;
public StreamedContent getPhoto1() {
byte[] myByteArray = meFacade.find(selected).getPhotoOne();//code for MeFacade not shown here
photo1 = new DefaultStreamedContent(new ByteArrayInputStream(myByteArray) , "image/jpeg");
if(photo1!=null){
System.out.print("photo1 is NOT null");
}
return photo1;
}
public void setPhoto1(StreamedContent photo1) {
this.photo1 = photo1;
}