Display image from database with p:graphicImage
- by minhltnt
I'm trying to display image type byte which saved in database to return StreamedContent to the p:graphicImage, as follows:
private StreamedContent content; // getter and setter
public StreamedContent getImageF() {
if (student.getImage() != null) {
InputStream is = new ByteArrayInputStream(student.getImage());
…