-
1. Re: .csv
norman.richards Feb 6, 2007 7:23 PM (in response to tony.herstell1)I don't see why you couldn't do that with a facelets template.
-
2. Re: .csv
pmuir Feb 6, 2007 7:34 PM (in response to tony.herstell1)There might be some issues with altering the content type and file extension I guess - ask on the facelets list about this (they are very helpful), but writing out the data should be as easy as:
<ui:composition ...> <ui:repeat value="#{list}" var="row"> #{row.a},#{row.b},#{row.c} </ui:repeat> </ui:composition>
-
3. Re: .csv
stu2 Feb 6, 2007 8:24 PM (in response to tony.herstell1)Writing out csv files you also have to consider escaping values within which may contain commas.
It's probably easier just to use a library specifically for csv generation, like http://www.csvreader.com/ -
4. Re: .csv
tony.herstell1 Feb 6, 2007 8:30 PM (in response to tony.herstell1)Thanks for the replies.
I meant for something like a excel sheet icon and you click it to get a save'as dialog box.
You then Stream down your csv file for the John to save to their hard disk.
All this info is useful however. -
5. Re: .csv
norman.richards Feb 6, 2007 11:11 PM (in response to tony.herstell1)It sounds like you might want an EL function or even a component to escape things the way you like. If you think this has general appeal, I strongly encourage you to put something together and make it available. You should be able to make it a one JAR add-on that someone can plop into a seam app and use. (I'd really like to see even more community supported libraries like this in the future)