Hello!

I think class WResource is what you are looking for. Connect WAnchor
to it and set mime type to something save-able (as opposed to
view-able). This results in default file save dialog of browser. I do
not know if this dialog can be customised.

http://www.webtoolkit.eu/wt/doc/reference/html/classWt_1_1WResource.html

Implement generation of CSV inside handleRequest() method. Stream
output lines of CSV file to response.out() stream.

This works good for small files. If you file is large or its
generation is resource resource intensive, consider using
WStreamResource (with implementing your own istream, producing CSV
lines) or WFileResource (with pre-saving whole file to disk).


On Wed, Sep 19, 2012 at 4:26 AM, Craig Miller
<craig.mil...@spatialminds.com> wrote:
> I'm trying to implement what I believe is a fairly straight-forward use-case, 
> but I can't seem to find the right classes to implement a solution.
>
> The use-case is to export a CSV of the current Dbo model and save it to the 
> users computer.
>
> - Are there any utility classes already in existence to help me create a 
> virtual CSV file?
> - Is there a Wt File Save Dialog class?
>
> Thanks,
> Craig
>
> Craig Miller
> http://spatialminds.com
>
>
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> witty-interest mailing list
> witty-interest@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/witty-interest

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
witty-interest mailing list
witty-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to