A possibility is to store the parameters (that are needed to construct the data set) in a session ASO. You can inject the above session ASO into your service. So that the data set can be constructed in your service when the service is called.
Shing --- Julian Wood <[EMAIL PROTECTED]> wrote: > I finally got back to this. I wrote up a service to > send the csv > files (using > http://lombok.demon.co.uk/serviceHowTo/app - thanks > > Shing for the example - well done), which all works > fine, but I have > one question (which could easily be addressed by > using the > "unsanctioned" approach mentioned in the FAQ - > thanks Nick). > > Imagine you've done a bunch of work in > home.html/home.java to create > a set of data. Now you're ready to save it as a csv > file. You click > on the link which invokes the csv service, but it's > unrealistic to > pass all the parameters needed to re-create the data > set to the > service, or to even pass the data set itself (via a > parameter). > Home.java, of course, knows all about this set of > data (as does the > session). So how can the service be told to get the > data set from > Home.java (or from the session)? One way around it > seems to be to use > a regular @DirectLink, which would create the file > and then redirect > to the csv service, which would then stream the file > (instead of > assembling it on the fly). It would be nicer though > if it can be done > without writing intermediate files. > > Any hints? > > Thanks, > > J > > On 10-Jul-06, at 4:49 PM, Julian Wood wrote: > > > > > I would like to click a link, have a listener > assemble a CSV file, > > and send it back as a download (ie change a few > headers behind the > > scenes like Content-Type and Content-Disposition). > > -- > Julian Wood <[EMAIL PROTECTED]> > > Software Engineer > Teaching & Learning Centre > University of Calgary > > http://tlc.ucalgary.ca > > > Home page : http://uk.geocities.com/matmsh/index.html ___________________________________________________________ All new Yahoo! Mail "The new Interface is stunning in its simplicity and ease of use." - PC Magazine http://uk.docs.yahoo.com/nowyoucan.html --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]