-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi all,
my code
AImage ia = new org.zkoss.image.AImage(obj.hashCode()+"",obj.getByte());
Image img = new Image();
img.setContent(ia);
I working fine but when i refresh url of img change any time
http://localhost:8080/zk5/zkau/view/zd_rdl1/z_rdl_a1/1/c/1950629103.jpeg
http://localhost:8080/zk5/zkau/view/zd_sdl1/z_sdl_a1/1/c/1950629103.jpeg
http://localhost:8080/zk5/zkau/view/zd_tdl1/z_tdl_a1/1/c/1950629103.jpeg
http://localhost:8080/zk5/zkau/view/zd_udl1/z_udl_a1/1/c/1950629103.jpeg
http://localhost:8080/zk5/zkau/view/zd_vdl1/z_vdl_a1/1/c/1950629103.jpeg
how to fix it
Thank you.
because the component's uuid will change each time you refresh the page.
you can use an ID Generator to generate the same Uuid each time the same component.
Asked: 2010-09-22 21:13:53 +0800
Seen: 250 times
Last updated: Sep 24 '10