Re: [T5]: query regarding streaming data

2008-12-16 Thread tapestryphoto
Thanks Julian - that did the trick. Much appreciated. p. Quoting Julian Wood : It works fine. Try something like this: public class TestPage { public Object onPDF(Long id) { return new PDFStreamResponse(dao.getPDF(id)); } public Link getPDFLink() { return resou

Re: [T5]: query regarding streaming data

2008-12-15 Thread Peter Stavrinides
nse.setContentLength(docLength); } }; cheers, Peter - Original Message - From: "tapestryphoto" To: users@tapestry.apache.org Sent: Monday, 15 December, 2008 3:45:06 PM GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: [T5]: query regarding streaming data Hi, po

Re: [T5]: query regarding streaming data

2008-12-15 Thread Julian Wood
It works fine. Try something like this: public class TestPage { public Object onPDF(Long id) { return new PDFStreamResponse(dao.getPDF(id)); } public Link getPDFLink() { return resources.createActionLink("pdf", false); } } public class PDFStreamResponse implemen

Re: [T5]: query regarding streaming data

2008-12-15 Thread tapestryphoto
Thanks Olle, However, reading the docs I see that the Streaming applies to components. In my situation I need to open a new window, which I currently do with JavaScript (in this example I'm obviously opening a local file, but as I said, in the real version it needs to come from the DB):

Re: [T5]: query regarding streaming data

2008-12-15 Thread Olle Hallin
Yes, there is. Let your handler method return a StreamResponse object. See http://tapestry.apache.org/tapestry5/guide/pagenav.html and http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry5/StreamResponse.html. Olle 2008/12/15 tapestryphoto > Hi, > > possibly not Tapestry specific

[T5]: query regarding streaming data

2008-12-15 Thread tapestryphoto
Hi, possibly not Tapestry specific and I'm not knowledgable enough on this subject, so apologies. I would like to be able to display a PDF that I obtain from a database using Hibernate via Tapestry. Is there a way to stream the data? thanks, p.