You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Boris Sachsenberg <bs...@gmx.net> on 2004/03/30 20:18:38 UTC

Passing java objects to jxtemplate using cli

Hi,

I have the following setting in my cocoon application:
User fills in a form and submits it. Then an email will be created and sent
to the user. Additionally the user gets a confirmation message in his
browser. 

I use woody, flow and jxtemplate for this approach. After submitting a form
a java class is called from the flow javascript. In this class I plan to
send the email with java mail. I plan to send html mail and produce the html
to be sent also with cocoon. 

How I do this best? My idea is to use cocoon cli interface within my java
class to prodcue the html for javamail. I use the cocoonwrapper class for
that. Now my problem is how do I pass user information from my java class to
the cli cocoon instance in order to customize the prodcued email with what
the user sent in the form? I also plan to use jxtemplate. I miss something
like the bizdata attribute which you can use to pass a java object to
jxtemplate when you call it from flowscript. Sure I could use
request-parameters but how do i pass more complex java objects with that?

Thanks very much for sending your suggestions.

Boris


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Passing java objects to jxtemplate using cli

Posted by Mark Lundquist <ml...@wrinkledog.com>.
On Mar 30, 2004, at 12:14 PM, Ugo Cei wrote:

> Il giorno 30/mar/04, alle 20:18, Boris Sachsenberg ha scritto:
>
>> I use woody, flow and jxtemplate for this approach. After submitting 
>> a form
>> a java class is called from the flow javascript. In this class I plan 
>> to
>> send the email with java mail. I plan to send html mail and produce 
>> the html
>> to be sent also with cocoon.
>
> See cocoon.processPipelineTo:
>
> <http://cocoon.apache.org/2.1/userdocs/flow/api.html#Cocoon+Object>

Also, instead of writing your own class to invoke javamail, you might 
take a look at the SendmailAction and SenmailTransformer that come with 
Cocoon.  These are in the "mail" block, and there are samples.

mark


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Passing java objects to jxtemplate using cli

Posted by Ugo Cei <u....@cbim.it>.
Il giorno 30/mar/04, alle 20:18, Boris Sachsenberg ha scritto:

> I use woody, flow and jxtemplate for this approach. After submitting a 
> form
> a java class is called from the flow javascript. In this class I plan 
> to
> send the email with java mail. I plan to send html mail and produce 
> the html
> to be sent also with cocoon.

See cocoon.processPipelineTo:

<http://cocoon.apache.org/2.1/userdocs/flow/api.html#Cocoon+Object>

	Ugo


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Passing java objects to jxtemplate using cli

Posted by Mark Lundquist <ml...@wrinkledog.com>.
On Mar 30, 2004, at 10:18 AM, Boris Sachsenberg wrote:

> Hi,
>
> I have the following setting in my cocoon application:
> User fills in a form and submits it. Then an email will be created and 
> sent
> to the user. Additionally the user gets a confirmation message in his
> browser.

Interesting, I have a similar problem to solve, and I was  just going 
to post some questions about it.  I think I will still start a new 
thread for that...

But as Ugo pointed out, cocoon.processPipelineTo( ) is your buddy... :-)

~mark


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org