Thanks for the help everyone. It's working great. I'm almost finished with phase 1 of this project at which point we'll be publishing it to github.
Craig Craig Miller http://spatialminds.com On Sep 19, 2012, at 1:28 AM, Wim Dumon wrote: > In addition, you could write a small piece of code that reads from a > Wt model and writes out CSV files. Then use a QueryModel to query your > database and write out csv files. > > Wim. > > 2012/9/19 Nagaev Boris <[email protected]>: >> 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 >> <[email protected]> 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 >>> [email protected] >>> 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 >> [email protected] >> 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 > [email protected] > https://lists.sourceforge.net/lists/listinfo/witty-interest ------------------------------------------------------------------------------ How fast is your code? 3 out of 4 devs don\\\'t know how their code performs in production. Find out how slow your code is with AppDynamics Lite. http://ad.doubleclick.net/clk;262219672;13503038;z? http://info.appdynamics.com/FreeJavaPerformanceDownload.html _______________________________________________ witty-interest mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/witty-interest
