Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    How to swap out image from HLayout

    I'm running smartgwt 3.0 and gwt 3.0. I've got an Img that gets created and I want to swap that image out for another image from time to time. I tried removeMember, from the layout, I tried destroy on the Img, I tried setSrc. Nothing works. The image gets created freshly on the server, so it is a different image, but the src url never changes. It overwrites the file on the server, and I re-create the image with new Img(graphURL.toString()) everytime. What is the proper way to get this image redrawn to show the new image?

    #2
    Either set appropriate HTTP headers on the image so the browser does not cache it, or change the URL by adding an arbitrary parameter each time, to defeat caching.

    Comment


      #3
      Originally posted by Isomorphic
      Either set appropriate HTTP headers on the image so the browser does not cache it, or change the URL by adding an arbitrary parameter each time, to defeat caching.
      I like the not caching idea. I've searched a bit but still don't have an idea of how I would do this? Do you have a link or API you could point me to?

      Comment


        #4
        setSrc(realURL + somethingRandom)

        Comment


          #5
          Cool. I added a "?" followed by the system time and it worked

          Comment

          Working...
          X