Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pe:multiFileDownload #1

Closed
ova2 opened this issue Jan 3, 2013 · 1 comment
Closed

Add pe:multiFileDownload #1

ova2 opened this issue Jan 3, 2013 · 1 comment
Assignees
Labels
Milestone

Comments

@ova2
Copy link
Member

ova2 commented Jan 3, 2013

Extend fileDownload tag, FileDownloadTagHandler, FileDownloadActionListener, StreamedContent, DefaultStreamedContent. The main goal is to generate a zip file of many StreamedContents.

  1. Allow to add childs of type StreamedContent to the new ZipStreamedContent (extends StreamedContent). ZipStreamedContent zips all containing childs of type SreamedContent.
  2. Allow to handle byte arrays (byte[]) as content and not only InputStream.
  3. FileDownloadActionListener should distinguish between StreamedContent and ZipStreamedContent. It should zip files and generate zipped output if "file" implements ZipStreamedContent.
  4. FileDownloadActionListener should be able to be used in portlet environment (no direct access to reqiest object!).
  5. Add a new attribute "responseHeader" to the tag fileDownload which accepts a single value, an array, a collection or list of string(s). Possible response headers are e.g. Cache-Control and Pragma. FileDownloadTagHandler should be extended to this attribute.

Don't forget to check in action listener if response was completed. If yes ==> return from action listener. Call facesContext.responseComplete() (s. PF's FileDownloadActionListener) is not enough because events are queued and all action listeners are called in INVOKE_APPLICATION phase until the phase finished (regardless of set flags). At the end of each phase UIViewRoot.clearFacesEvents() is called, checks set flags and clears queued events if nessesary.

PF related bug http://code.google.com/p/primefaces/issues/detail?id=1656

By the way, iframe will not solve problem with ajaxified components. FileDownload cann't be ajaxified.

@ghost ghost assigned ova2 Jan 3, 2013
@ova2
Copy link
Member Author

ova2 commented Mar 25, 2013

Outdated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant