[Seaside-dev] FW: Deferring file downloads until link is clicked

Tanner, Brian brian.tanner at hp.com
Thu Oct 16 18:49:01 UTC 2014


Hi Philippe,

Thanks for your help. I'm using Seaside 3.0.7.

Your suggested solution solves my probleem. Thankyou very much for your help,

Regards,

Brian Tanner
Information Specialist
ES WW Application Services (APP)

brian.tanner at hp.com
T +31 30 700 1306
M +31 6 11706314
PC +31 20 721 1814

Hewlett-Packard Nederland B.V.
Orteliuslaan 1000
3528 BD Utrecht
The Netherlands



Please print thoughtfully

-----Original Message-----
From: seaside-dev-bounces at lists.squeakfoundation.org [mailto:seaside-dev-bounces at lists.squeakfoundation.org] On Behalf Of Philippe Marschall
Sent: donderdag 16 oktober 2014 20:33
To: Seaside - developer list
Subject: Re: [Seaside-dev] FW: Deferring file downloads until link is clicked

On Thu, Oct 16, 2014 at 2:43 PM, Tanner, Brian <brian.tanner at hp.com> wrote:
>
> Now sent van my registered e-mail adress
>
> _____________________________________________
> From: Tanner, Brian
> Sent: donderdag 16 oktober 2014 14:33
> To: 'seaside-dev at lists.squeakfoundation.org'
> Subject: Deferring file downloads until link is clicked
>
>
> Dear mailing list,
>
> I’m having problems downloading documents using Seaside with Cincom Smalltalk 7.9.1.
>
> I see that a document is downloaded during rendering whilst I wish that to be deferred until the user clicks op the link (anchor). On the Seaside website (documentation, FAQ, How to: entry 14) there is an explanation of how to resolve this problem by using a callback on the anchor:
>
> Is there a convenient way to make the document be created after the link is clicked?
> Yes, this is a common problem. One solution is to create an anchor and redirect:
> html anchor
>     callback: [
>         self session returnResponse: (WAResponse
>             document: anObject
>             mimeType: aMimeType
>             fileName: aString) ];
>     with: 'Export'.
>
> This information however seems to be outdated.

Yes, that's Seaside 2.x style. I just fixed this

> There is for example no Class method WAResponse>>document:mimeType:filename , there is however an instance method with this name. I understand that I need to access the response in the active Request Context, but how do I do that?

Which version of Seaside do you use? If you're unsure you can inspect the following

GRPlatform current seasideVersion

In Seaside 3.x you'd use something along the lines of:

 self requestContext respond: [ :response |
        response
              document: anObject
              mimeType: aMimeType
              fileName: aString ]


Cheers
Philippe
_______________________________________________
seaside-dev mailing list
seaside-dev at lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev


More information about the seaside-dev mailing list