cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andre Juffer <ajuf...@sun3.oulu.fi>
Subject Re: JX and sendmail transformer
Date Thu, 14 Dec 2006 19:49:17 GMT
Thanks guys,

the "cocoon:/" solved everything. The http resulted either in a new 
session object or no session object at all rendering the object unavailable.

Thanks,
Andre


Mark Lundquist wrote:
> hi Andre,
> 
> On Dec 13, 2006, at 12:10 PM, Andre Juffer wrote:
> 
>> Hi,
>>
>> I need to access one object in a JX generated response which is 
>> requested for by email:body using the src attribute. I have stored 
>> this object in the current session in flow using 
>> cocoon.session.setAttribute("object-name", object). The flowscript 
>> then subsequently passes the control to the sitemap to generate an 
>> email that needs certain information extracted from this object.
> 
> BTW are you sure you want to use the session for this and not a request 
> attribute?  Just askin'...
> 
>> The email transformer encounters something similar as the following
>>
>>   <email:sendmail>
>>     ....
>>     <email:body src="http://my-server/cocoon/something" />
> 
> Wouldn't it be better to use an internal "cocoon:/" source there instead 
> of "http://"?
> 
>>   </email:sendmail>
>>
>> The 'something' is matched in the sitemap by the JX generator which 
>> processes a file containing a line like 
>> ${cocoon.session.getAttribute('object-name').getFoo()} where foo is 
>> the property that is needed in the email message. I am using the src 
>> attribute since I want to generate an HTML-based email message.
>>
>> This all works fine (the whole process from begin to end ultimately 
>> results in an email correctly delivered), except that I am not able to 
>> access this property foo (the method getFoo() on the object does 
>> certainly exist).
> 
> Are you positive that the object itself exists?  Maybe there's really no 
> session attribute named 'object-name'...
> 
> —ml—
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 


-- 
Andre H. Juffer              | Email: Andre.Juffer@oulu.fi
The Biocenter and            | WWW: www.biochem.oulu.fi/Biocomputing/
     the Dep. of Biochemistry | Fax: +358-8-553-1141
University of Oulu, Finland  | Phone: +358-8-553 1161
Triacle Biocomputing         | WWW: www.triacle-bc.com

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


Mime
View raw message