12 Replies Latest reply on Feb 8, 2011 8:27 AM by Michael Weber

    Using a4j:mediaOutput to display a JPEG from a BLOB

    Roger Lee Apprentice

      I have successfully used rich:fileUpload and a4j:mediaOutput to upload a JPEG from my local drive, preview it on the web page then persist it using JPA and an EJB into a MySQL table of type BLOB.


      I am now trying to display the the JPEG on another page.


      I read the contents of the table into seperate Entity Beans in a list. I iterate through the list and dislay the date/time stamp, description of the JPEG but the actual JPEG is just displayed as a broken link/"X" in the image style (style="width:100px; height:100px;").


      Any examples of reading a BLOB and displaying it using a4j:mediaOutput.


      I have tried passing the entities reference to the JPEG (BLOB) back to the Bean which does the preview paint, but no joy with that either.