I have an image saved in the database as BLOB. I am loading this image in
memory and can access it using getUser().getPhotoImage() which returns an
object of type java.io.File. How can I display this image on a tapestry html
page using a Tapestry Asset?
Petros
Howard Lewis Ship wrote:
In
Sorry, I did not see your T5 requirement.
This is for T4
- Original Message -
From: Allen Guo [EMAIL PROTECTED]
To: Tapestry users users@tapestry.apache.org
Sent: Wednesday, May 23, 2007 12:01:04 PM (GMT-0500) America/New_York
Subject: Re: How to load a image dynamiclly in tapestry5.0.4
The book The Pragmatic Programmer is an excellent start on learning how to
organize your code and your mind and work effectively, professionally, and
pragmatically.
http://www.powells.com/biblio/65-9780201616224-0
On 5/21/07, Allen Guo [EMAIL PROTECTED] wrote:
Thanks , It's running now
But
+1 I picked it up after seeing Howard mentioned it and loved it. :)
On 5/22/07, Howard Lewis Ship [EMAIL PROTECTED] wrote:
The book The Pragmatic Programmer is an excellent start on learning how
to
organize your code and your mind and work effectively, professionally, and
pragmatically.
But I don't think it's useful for me to organize TAPESTRY application
effectlly.
That books just represent basic programming Philosophy .
Jesse Kuhnert 写道:
+1 I picked it up after seeing Howard mentioned it and loved it. :)
On 5/22/07, Howard Lewis Ship [EMAIL PROTECTED] wrote:
The book The
On 5/21/07, Howard Lewis Ship [EMAIL PROTECTED] wrote:
Wait for 5.0.5 ... I'm working on code for that right now, so you'll be able
to write:
img src=/products_images/${productImageURL}/
Still, from a maintainability situation, I would prefer that the complete
URL come from the Java code
Thanks , It's running now
But suppose there is five properties of Product is relative with image
Product class looks like
class Product{
private String _img1;
private String _img2;
private String _img3;
private String _img4;
private String _img5;
}
So for show the img, I have to define the
This is how I used Asset for an image in T5.0.4
Java class
@Inject
@Path(context:images/banners/new_logo.jpg)
private Asset logoImage;
HTML code
prop:logoImage
Petros
Allen Guo wrote:
Hi All,
I want to show the ProductDetail page with product image. It looks like
p_001.jpg .
This is how I used Asset for an image in T5.0.4
Java class
@Inject
@Path(context:images/banners/new_logo.jpg)
private Asset logoImage;
HTML code
imgimg t:type=Any src=prop:logoImage width=30% height=92
border=0 /
Petros
Allen Guo wrote:
Hi All,
I want to show the ProductDetail page
In order to answer this question, some background is needed.
If you know the product's id (whatever you use, where it's SKU number or a
surrogate key) ... what is the exact process from going from that to a URL
suitable for an img tag?
That is ... are the images stored in the database? Or are
Thank you very much. My image file is put on file system. It works now.
But I feel that it's not flexible.
I wrote the img tag like
img t:id=productImage src=prop:productImageURL/
But I want write it like
img t:id=productImage src=/products_images/prop:productImageURL/
You see, there is a folder
Wait for 5.0.5 ... I'm working on code for that right now, so you'll be able
to write:
img src=/products_images/${productImageURL}/
Still, from a maintainability situation, I would prefer that the complete
URL come from the Java code side; if /product_images ever becomes, say,
/images/catalog
Hi All,
I want to show the ProductDetail page with product image. It looks like
img src=p_001.jpg /.
You know, every product has different image name,so I need to pass the
string 'p_001.jpg' to the corresponding page.
As result the img tag should look like img src=${product.image}/ or
I can use
13 matches
Mail list logo