Uploaded image for project: 'Seam 2'
  1. Seam 2
  2. JBSEAM-1350

Provide download component (e.g.<s:download value=#{FileManager.getFileById('10')" contentType="#{FileManager.contentType}" />)

    Details

    • Type: Feature Request
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 2.1.2.CR1
    • Component/s: JSF Controls
    • Labels:
      None
    • Affects:
      Documentation (Ref Guide, User Guide, etc.)
    • Estimated Difficulty:
      Medium

      Description

      <s:download value=#{FileManager.getFileById('10')" contentType="#

      {FileManager.contentType}

      " />

      We're going to create new (more general component) which allows the user to download a file (any resource, Excel file, Document whatever).

      The plan is to create a new UI component named UIDownload which has attributes like value, contentType (some more?).

      1) UIDownload a backing bean (value) (is this still valid word in the seam world?) to generate the data ( allow byte[], OutputStreams ?).

      2) UIDownload creates DownloadResource which is stored in DownloadStore.

      3) UIDownload generates HTML which redirects the browser to ResourceServlet

      4) ResourceServlet then uses DownloadResource to get hold of the data and the pushes it to browser

      The reason for this is that we're building portlets with Seam and it's impossible to "download" files from a portal environment without additional servlet and we think it's good idea to reuse existing stuff.

      Patch coming soon (if we can make it work

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  d00roth Daniel Roth
                  Reporter:
                  jjarkko Jarkko Lietolahti
                • Votes:
                  6 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: