Cheers,
Thx for swift reply.
- Not using zone param in the actionlink for downloading the pdf though.
I can't post the complete code (as its a whole lot going on :-)
The page has the following layout;
- Left column; Listing reports. Each report represented by an
actionlink with zone param="reportDetails" (<t:actionlink
t:id="selectReport" context="report.id" zone="reportDetails">$
{report.name}</t:actionlink>)
- Right column: Showing details about a report. The details are
wrapped in a zone "reportDetails". Inside the zone is an actionlink to
download a pdf (<t:actionlink t:id="downloadPdf">${message:report-downloadPdf
}</t:actionlink>)
the page class has the following code for the actionlinks mentioned
above;
// download pdf
StreamResponse onActionFromDownloadPdf() {
/* this code basically constructs a pdf and returns a
StreamResponse, as described in http://wiki.apache.org/tapestry/Tapestry5HowToStreamAnExistingBinaryFile
*/
return new PDFTransformer().generatePDF(report);
}
// actionlink for returning reportDetails Zone
Object onActionFromSelectReport(int id) {
Report report = reportRepository.findById(id);
return reportDetails.getBody();
}
not much magic in this. Obviously since the page has lots of other
stuff, this could be the cause,
I might have to make a simpler page to isolate the problem, but was
hoping that maybe someone else has stumbled upon a similar scenario...
kind regards
Magnus
On 8. sep.. 2009, at 10.51, Joost Schouten (ml) wrote:
Hi Magnus,
I can't quite oversee your situation correctly, but it sounds like
you have might have set the zone parameter on your actionlink for
downloading your pdf. If your link returns a stream, tapestry cannot
add the required JSON needed for appropriate zone handling and
consequently obstructing the next zone updates. If this is the case,
remove the zone parameter from your downloading link and it should
work fine. Otherwise, post your code.
Cheers,
Joost
Magnus Rundberget wrote:
Hi,
I have a page with a left hand listing of reports and a righthand
zone showing details for the reports when clicking reportlinks in
the listing. In the zone I have an actionlink for downloading a pdf
version of the report.
When clicking the links in the listing the zone updates correctly.
But as soon as I click and download a pdf, the report-links on the
lefthand side seizes to work. To get them working again I have to
refresh the page.
Using firebug I can see that the actionlink posts and receives the
correct response, but the zone is never updated. Tried debugging
the Tapestry Javascript but can't figure out where exactly it fails.
(It does enter ZoneManager.updateFromURL, but never invokes
ZoneManager.processReply)
I've used the following wiki page as inspiration for returing the
pdf:
http://wiki.apache.org/tapestry/Tapestry5HowToStreamAnExistingBinaryFile
anyone got any ideas ?
regards
Magnus
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org