Re: Save Data as CSV File

2010-09-29 Thread Peter Karich
Hi, this worked for me: WebResource export = new WebResource() { @Override public IResourceStream getResourceStream() { return new StringResourceStream(getTweetsAsString(), "text/plain"); } @Override protected void setHeaders(WebResponse response) { super.set

Re: Save Data as CSV File

2010-09-29 Thread Antoine Angenieux
You can use the constructor that takes an IModel and pass a LoadableDetachableModel or AbstractReadOnlyModel in which you generate your file. Don't Forget to call setDeleteAfterDowload(true) on your DownloadLink to avoid filling your drive too fast! I do that all the times and as usually with W

Save Data as CSV File

2010-09-29 Thread Shelli Orton
I have a data table and would like the user to be able to save the data locally as a csv file when they click a link or button. The docs for DownloadLink state that it will generate a "save as" dialog which is exactly what I want, but, it appears to only work with a file that already exists. I ha