Igor, you rock ! :-D .
Igor Vaynberg wrote:
> sure it does :)
>
> private class DownloadEulaPdfLink extends Link {
>
> public DownloadEulaPdfLink(String id) {
> super(id);
> }
>
> @Override
> public void onClick() {
> RequestCycle.get().setRequestTarget(new IRequestTarget() {
>
> public void detach(RequestCycle requestCycle) {
> }
>
> public Object getLock(RequestCycle requestCycle) {
> return null;
> }
>
> public void respond(RequestCycle requestCycle) {
> final String
> pdfPath="/WEB-INF/eula/"+props.getProperty(PROP_PDF);
> InputStream pdfStream=getResourceAsStream(pdfPath);
> if (pdfStream==null) {
> throw new RuntimeException("Could not find PDF
> file, tried [["+pdfPath+"]]");
> }
>
> WebResponse r=(WebResponse)
> requestCycle.getResponse();
> r.setAttachmentHeader("eula.pdf");
> r.setContentType("application/pdf");
> try {
> Streams.copy(pdfStream, r.getOutputStream());
> } catch (IOException e) {
> throw new RuntimeException(e);
> }
> }
>
> });
> }
>
> }
>
> On 7/17/06, *Dorel Vaida* < [EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>> wrote:
>
> Is there an easy way, (or an example :-)), of how to stream an Excel
> (application/vnd.ms-excel) to the client ? With the beta4 version
> it was
> working to write the bytes to wicket response's output stream and set
> the content disposition etc on the http servet response, but that
> seem
> not to work anymore.
>
> Thanks,
> Dorel
>
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services,
> security?
> Get stuff done quickly with pre-integrated technology to make your
> job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache
> Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642>
> _______________________________________________
> Wicket-user mailing list
> [email protected]
> <mailto:[email protected]>
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>
> ------------------------------------------------------------------------
>
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>
>
> __________ NOD32 1.1523 (20060505) Information __________
>
> This message was checked by NOD32 Antivirus System.
> http://www.nod32.com
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Wicket-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user