[Seaside] WAComponent and HTML Emails?

Boris Popov boris at deepcovelabs.com
Thu Aug 9 18:48:36 UTC 2007

I've rendered components to feed our PDF generator, sounds like it would
be similar to just get the HTML back. You'll need to add a bit of
context yourself, as this is ripped straight out of the system, see last
line there in #renderPDF that would be the string you need.

Component>>asPDF: contact
    use: (self createPDFSession: contact)
    during: [self renderPDF].

Component>>createPDFSession: contact
 ^(PDFSession new)
	setParent: MyAppRoot application;
	attachContact: contact;

 | handler response |
 handler := WARenderHandler root: (PDFRoot for: self).
 response := WAResponse new.
		((WARenderingContext new)
			session: self session;
			actionUrl: WAUrl new;
 handler processRendering: response.
 ^response contents contents.

Hope this helps,


DeepCove Labs Ltd.
4th floor 595 Howe Street
Vancouver, Canada V6C 2T5

boris at deepcovelabs.com


This email is intended only for the persons named in the message
header. Unless otherwise indicated, it contains information that is
private and confidential. If you have received it in error, please
notify the sender and delete the entire message including any

Thank you.

> -----Original Message-----
> From: seaside-bounces at lists.squeakfoundation.org [mailto:seaside-
> bounces at lists.squeakfoundation.org] On Behalf Of Ramon Leon
> Sent: Thursday, August 09, 2007 11:43 AM
> To: 'Seaside - general discussion'
> Subject: [Seaside] WAComponent and HTML Emails?
> Has anyone ever rendered a WAComponent to a string for use in an HTML
> formatted email?
> Ramon Leon
> http://onsmalltalk.com
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

More information about the seaside mailing list