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
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
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
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):
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
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.