PDA

View Full Version : Export data to CSV


ronniecr7
11-17-2009, 09:04 AM
Hi,
Im trying to Export data from Flex as a file download(csv).

Im sending the data from flex to struts, and then after i retrieve data from a session bean, i send it to a jsp file where it is converted to csv and then given as a file download popup. When i access the action class directly from url i get the file download. But when i go thro flex i don get it.

i guess the response type is not been understood by flex. I set the content type in jsp as "application/csv".

My httpservice:
<mx:HTTPService id="exportData"
url="http://....../*****EJB/ExportDataEJB.java"
result="FileDownload(event)" />

when i click the export button it calls an export() function, which den sends dis http service along with parameters.
In the result function, i.e, filedownload(), how shud i receive the csv file data from jsp and put it as a file download?

ronniecr7
11-18-2009, 03:01 PM
Is this a wrong place for this post/question?????
Coz ders been no reply.......