Now sent van my registered e-mail adress
_____________________________________________
From: Tanner, Brian Sent: donderdag 16 oktober 2014 14:33 To: '[hidden email]' 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. 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?
Regards,
Brian Tanner
Information Specialist ES WW Application Services (APP) [hidden email] 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 _______________________________________________ seaside-dev mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev |
On Thu, Oct 16, 2014 at 2:43 PM, Tanner, Brian <[hidden email]> wrote:
> > Now sent van my registered e-mail adress > > _____________________________________________ > From: Tanner, Brian > Sent: donderdag 16 oktober 2014 14:33 > To: '[hidden email]' > 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 [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev |
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) [hidden email] 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: [hidden email] [mailto:[hidden email]] 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 <[hidden email]> wrote: > > Now sent van my registered e-mail adress > > _____________________________________________ > From: Tanner, Brian > Sent: donderdag 16 oktober 2014 14:33 > To: '[hidden email]' > 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. > 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 [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev _______________________________________________ seaside-dev mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev |
Free forum by Nabble | Edit this page |