Re: How to display a Blob (byte[]) from database in a Tapestry template

2017-11-02 Thread Christopher Dodunski
Thank you for your help. I corrected those two oversights, and got the class working successfully by changing the onActivate() parameter from byte[] to 'User' (code below). The image now displays, but I wonder if when passing a 'User' object Tapestry passes just the id as reference (using Tapestr

Re: How to display a Blob (byte[]) from database in a Tapestry template

2017-11-02 Thread Cezary Biernacki
Hi, first you have a compilation problem related to basic Java: methods getContentType() and prepareResponse() should be public as they are required by StreamResponse interface - it is what the compiler complains about. However the second problem is that BlobImage.onActivate() should not require a

How to display a Blob (byte[]) from database in a Tapestry template

2017-11-02 Thread Christopher Dodunski
Hi all, I am having a little difficulty with what I imagine is a very common use case: displaying a user's profile image alongside their personal details following successful login. Displaying the JavaBean strings served up by Hibernate is easy. Just displaying the database Blob (stored as a byt