[Seaside] WAComponent and HTML Emails?

Boris Popov boris at deepcovelabs.com
Fri Aug 10 16:17:19 UTC 2007


1. Google for PDFReactor, I really enjoy the degree to which the documents can be customized and its rendering engine with support for SVG creates great results.
2. Ignore it, our application is built around sessions owned by contacts, so this just simulates full context for components to render on a stream that is later fed to a PDF generator with matching styles.

Cheers!

-Boris
(Sent from a BlackBerry)

----- Original Message -----
From: seaside-bounces at lists.squeakfoundation.org <seaside-bounces at lists.squeakfoundation.org>
To: 'Seaside - general discussion' <seaside at lists.squeakfoundation.org>
Sent: Fri Aug 10 08:47:14 2007
Subject: RE: [Seaside] WAComponent and HTML Emails?

Hi Boris,

	can you tell which pdf generation tool are you using? I'm not sure
about understanding right the contact part in "Component>>asPDF: contact"

	cheers,

Sebastian Sastre

> -----Mensaje original-----
> De: seaside-bounces at lists.squeakfoundation.org 
> [mailto:seaside-bounces at lists.squeakfoundation.org] En nombre 
> de Boris Popov
> Enviado el: Jueves, 09 de Agosto de 2007 15:49
> Para: Seaside - general discussion
> Asunto: RE: [Seaside] WAComponent and HTML Emails?
> 
> 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
>   ^WACurrentSession
>     use: (self createPDFSession: contact)
>     during: [self renderPDF].
> 
> Component>>createPDFSession: contact
>  ^(PDFSession new)
> 	setParent: MyAppRoot application;
> 	attachContact: contact;
> 	yourself.
> 
> Component>>renderPDF
>  | handler response |
>  handler := WARenderHandler root: (PDFRoot for: self).
>  response := WAResponse new.
>  handler
> 	context:
> 		((WARenderingContext new)
> 			session: self session;
> 			actionUrl: WAUrl new;
> 			yourself).
>  handler processRendering: response.
>  ^response contents contents.
> 
> Hope this helps,
> 
> -Boris
> 
> -- 
> +1.604.689.0322
> DeepCove Labs Ltd.
> 4th floor 595 Howe Street
> Vancouver, Canada V6C 2T5
> http://tinyurl.com/r7uw4
> 
> boris at deepcovelabs.com
> 
> CONFIDENTIALITY NOTICE
> 
> 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 attachments.
> 
> 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
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
Seaside mailing list
Seaside at lists.squeakfoundation.org
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20070810/cb096113/attachment.htm


More information about the seaside mailing list