0

Download file content based on file extension

asked 2012-11-27 12:02:57 +0800

khanhlv gravatar image khanhlv
3

Hi everyone,
I am a beginner in Zkoss. I need your support related to download file.
I would like to make the download dialog as in desktop application:
- Users click 'Export' button
- Users select file extension, e.g: xls, pdf, doc
--> Depend on selection of users, software calls function to get corresponding data.
Currently, I found that the Filedownload does not support the above request.
I think that this is a basic request.

Is there any solution to solve this request?

delete flag offensive retag edit

1 Reply

Sort by ยป oldest newest

answered 2012-11-30 13:13:50 +0800

takach gravatar image takach
30 2

As you can see in the Live Demo Page of ZK at theFiledownload, the component is a simple Button, Filedownload is in the event handling code.

A possible solution is to implement a File-Extension-Chooser-Popup, and show this popup in the event handler of the button. Then in the event handler of the OK button of the Popup you can already call Filedownload.save() with the file name according to the extension chosen by the user.

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2012-11-27 12:02:57 +0800

Seen: 68 times

Last updated: Nov 30 '12

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More