Hi,
It's quite strange that every time when i click on the view image button, the image doesn't show up for the first click, but the image will be displayed when the second time the button is clicked.
on the server side, the first button click invokes the servlet and get image byte array fed back to the client:
I've tried using GWT Image to obtain the image details first and then load the image into SmartGWT Img, but it has the same issue. Here's the code how i do it:
There's a button in another class, when the button is clicked, this Window will .show(), and load up the image. But now i always have to click on the button, close the window, and click the button again to see the image.
i've also tried only using a GWT Image to display the image, the same.
Could you help me with it? Thanks!
It's quite strange that every time when i click on the view image button, the image doesn't show up for the first click, but the image will be displayed when the second time the button is clicked.
on the server side, the first button click invokes the servlet and get image byte array fed back to the client:
Code:
04 Jul 09:02:43 INFO r.servlet.ImageServlet..essRequest:108 - get image from /home/images/07030/11_0/0703011_0.png 04 Jul 09:02:43 INFO r.servlet.ImageServlet..essRequest:127 - Writing image png byte[] 139851 bytes to OutputStream
Code:
public class ImageViewWindow extends Window { ...... ...... Image i = new Image("/ImageServlet?connote=" + connoteNumber + "&carrier=" + parentCarrier + "&pageno" + pageNumber + "&type=" + imageType); Img image = new Img("/ImageServlet?connote=" + connoteNumber + "&carrier=" + parentCarrier + "&pageno" + pageNumber + "&type=" + imageType); image.setWidth(i.getWidth()); image.setHeight(i.getHeight()); final HLayout imgContainer = new HLayout(); imgContainer.addMember(image); final HLayout layoutImage = new HLayout(); layoutImage.setBackgroundColor("#000"); layoutImage.addMember(imgContainer); layoutImage.setOverflow(Overflow.AUTO); layoutImage.setPadding(5); this.addItem(layoutImage); }
i've also tried only using a GWT Image to display the image, the same.
Could you help me with it? Thanks!
Comment