1
I’m using it this way: XHTML:
<p:graphicImage value="#{emitenteBean.myImage}"
Bean:
private StreamedContent myImage;
try {
FileInputStream fileInputStream = new FileInputStream("/Users/user/files/minhaImg.jpg");
myImage = new DefaultStreamedContent(fileInputStream, "image/jpeg");
} catch (FileNotFoundException e) {
System.out.println("ERRO AO CONVERTER IMG.");
}
Does not display image and shows no error.
Great. I’ll try it!
– Jeremias Santos
You use Cat right? from what I recall from previous posts, if yes you could use those virtual directories, it’s a little boring to set up the first time, but it’s elegant to use in code afterwards, ex: virtual directory display-image-out-of-application-directory-jsf-and-primefac es - Dilnei Cunha
– Dilnei Cunha
I think I’m doing something wrong. The Image is not displayed:
– Jeremias Santos
See below what I did, but the error continues.
– Jeremias Santos