Peter,
That is going to be a bit of a problem.  For every request from the client you 
can get a response.  If you request the PDF then you get the PDF in the 
response.  Telling Tapestry to send another page will override the download.  
Which is the behavior you are seeing.  Our solution which we ultimately 
abandoned was to use an iFrame to contact a Tapestry 3 download Service which 
we had written to request the file.  So, once the page was sent back it checked 
to see if a document was available and if it was the iFrame kicked off a 
download.  We had to stop because if you crank up the security in IE it thinks 
someone is trying to do something sneaky and the download fails.  We ultimately 
went to putting a button on the page so they could download the file.

It might be possible to use AJAX to do this as part of a page download, I don't 
know enough about JavaScript to know if it is possible.

HTH,

Mark

Mark J. Stang
Senior Engineer/Architect
office: +1 303.468.2900
mobile: +1 303.507.2833
Ping Identity



-----Original Message-----
From: Peter Dawn [mailto:[EMAIL PROTECTED]
Sent: Thu 2/15/2007 8:14 PM
To: Tapestry users
Subject: Page Re-direction
 
guys,

i am using tap3 and have run into this problem.

i have this page, and this page contains a download button. when the
user clicks on the  download button, this current page, references
another class method. and when this other class finishes data
processing, it displays a PDF file which the user can download. the
user then selects save or cancel and the process is completed.

but what i really want to do is re-direct the user to another page
once this process is completed.

now within my original class i have formDownloadSubmit method and it contains,
ProcessingClass page = (ProcessingClass) cycle.getPage("PDFProcessingClass");
cycle.activate(page);
and PDFProcessingClass is a class which generates a PDF based on some
data processing I am doing.

now if i put,
cycle.activate("PreviousPage"); after cycle.activate(page), it
redirects the user to the required page very quickly, before even the
PDF generation has happened.

all i want to do is after cycle.activate(page) and once that class
finishes its data processing and allows the user to save the file
somewhere, i want to redirect the user to the previous page.

and i am stuck. i hope i have explained my problem. any ideas.

thanks.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to