--- Musachy Barroso <[EMAIL PROTECTED]> wrote: > Or you can write your own result, and generate the > CSV file there (reusable, clean, bla bla)
I did that, to a very small degree (not to the extent of JSONResult; I'm lazy) but haven't gotten around to cleaning it up yet--it's pretty hacky. Someone should go ahead and write a real version :D It seemed a bit much for the current question under discussion, I thought :) d. > > regards > musachy > > On 6/19/07, Dave Newton <[EMAIL PROTECTED]> > wrote: > > > > --- Skip Hollowell <[EMAIL PROTECTED]> wrote: > > > Quite honesty, I couldn't make the connection, > in my > > > head, on how the result parameters in my .xml > file > > > corresponded to the action and method I am > working > > in. > > > > I think the stream result is specifically to > stream > > the contents of an existing file, not for manually > > creating the output in an action (I could be > wrong; > > it's been over an hour snice I was last wrong, so > I'm > > quite a bit overdue). If you wanted to go this > route > > you'd probably have to physically create the file. > > > > > 1. I [don't] have to use the execute method, > > correct? > > > > Correct. > > > > You can still do write directly to the response; > just > > return null from the action so the normal > processing > > breaks (stuff left out for brevity, and this is > off > > the top of my head): > > > > public String csv() { > > HttpServletResponse response = > > ServletActionContext.getResponse(); > > out = response.getWriter(); > > response.setHeader("Content-Disposition", > > "attachment; filename=export.csv"); > > response.setContentType("text/csv"); > > out.println("Id,Date,Comment"); > > for (Comment c : _comments) { > > ...etc... > > } > > return null; > > } > > > > d. > > > > > > > > > > > > > ____________________________________________________________________________________ > > Got a little couch potato? > > Check out fun summer activities for kids. > > > > > http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+kids&cs=bz > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: > [EMAIL PROTECTED] > > For additional commands, e-mail: > [EMAIL PROTECTED] > > > > > > > -- > "Hey you! Would you help me to carry the stone?" > Pink Floyd > ____________________________________________________________________________________ Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, photos & more. http://mobile.yahoo.com/go?refer=1GNXIC --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]