You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Christofer Dutz <du...@c-ware.de> on 2005/10/08 16:34:43 UTC
Generate from global Flow variable
Hi,
I am still learning some of cocoons features. At the moment I am working on
a small demo online-shop. When generating the Confirmation Email I want to
generate a PDF from the cart-content. The cart itself is a simple DOM object
defined as global variable in my FlowScript. I read somewhere that I should
be able to generate content from this. Unfortunately I have no real Idea of
how this is done. I googled a litte and found the SessionAttributeGenerator
which seems to sort of deprecated and the XModuleSource where the
documentation seems to be quite rudimentary. Can anyone please give me some
Tips for this task?
Tanks in advance,
Chris
Re: Generate from global Flow variable
Posted by Leszek Gawron <lg...@mobilebox.pl>.
Christofer Dutz wrote:
> Hi,
>
>
>
> I am still learning some of cocoons features. At the moment I am working
> on a small demo online-shop. When generating the Confirmation Email I
> want to generate a PDF from the cart-content. The cart itself is a
> simple DOM object defined as global variable in my FlowScript. I read
> somewhere that I should be able to generate content from this.
> Unfortunately I have no real Idea of how this is done. I googled a litte
> and found the SessionAttributeGenerator which seems to sort of
> deprecated and the XModuleSource where the documentation seems to be
> quite rudimentary. Can anyone please give me some Tips for this task?
a quick tip (sorry I cannot do more now):
<map:generate src="xmodule:flow-attribute:myDOM"/>
you have to pass a variable called myDOM into the view either with:
cocoon.sendPage( "mail-sending-pipeline", { myDOM: myDOM } );
if you want to use SendMailTransformer
you could also use PipelineUtil.processToStream to make cocoon render
your attachment and send the mail yourself with a custom code but that's
another story :)
--
Leszek Gawron lgawron@mobilebox.pl
IT Manager MobileBox sp. z o.o.
+48 (61) 855 06 67 http://www.mobilebox.pl
mobile: +48 (501) 720 812 fax: +48 (61) 853 29 65
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org