Announcement

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

    How to show the selected image for FileItem

    SmartClient Version: SC_SNAPSHOT-2012-01-05_v8.1p/Pro Deployment (built 2012-01-05)

    Looking for a sample of how to show the image selected in FileItem. I cannot use a data source as in the example:

    http://www.smartclient.com/smartgwtee/showcase/#upload_sql

    There must be a lot of examples, but I am not finding them.

    #2
    If you can't use a DataSource you will need to build yourself a Servlet that can stream back the image from wherever it's stored, then create an HTML <img> tag whose "src" point to the Servlet.

    Comment


      #3
      Thank you so much for your quick response on the last post. I am wondering how if there is a way to capture the event once the FileItem has selected a file and the path has populated the FileItem field.

      Comment


        #4
        Events on upload items aren't reliable across browser and they will return different things for the path (some just the file, some the whole path, some nothing). Whatever you want this event for, it's unlikely the action you take will work :)

        Comment


          #5
          Thanks for earlier response. I just want to update and image src once the FileItem has been used to select a file. Is there a direct way to get the string generated from FileItem or Upload? Would extending that class be an option?

          Comment

          Working...
          X