Re: How to display a Blob (byte) from database in a Tapestry template
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 Tapestry-Hibernate ValueEncoder), or whether I ought to explicitly
pass the id like so: user.getId().
Also, Welcome.tml will untimately display several images from the
database, of different entity types and multiple instances. I'm wondering
how BlobImage.class might be called numerous times from the same template.
Finally, I tried your shorter alternative: "return
Base64.getUrlEncoder().encodeToString(user.getImage());". It didn't work;
the compiler seemed to point to the Java version (I use 1.8).