Sven Richter <[EMAIL PROTECTED]> writes:

>Hello (again),

>I added your suggestion:

>VelocityHtmlEmail vemail = new VelocityHtmlEmail(data);
>Context ctx = /TurbineVelocity.getContext/(data); /
>ctx.put/("vmail", vemail); /
>ctx.put/("bestellung", oData);
>/vemail.addTo/("emailaddress", "Sven Richter"); 
>///data.getUser/().getEmail());
>/vemail.setFrom/("Recipient", "emailaddress");
>/vemail.setHtmlTemplate/("portlets/html//email-confirm.vm/"); /
>vemail.send/();

>In that segment I put the oData-Objekt into the context, which I use to 
>get data from the database. Now I tried to reference that with 
>'$ctx.bestellung.id' (for example). But that didn't work (it stays 
>'$ctx.bestellung.id'). What did I do wrong?

The context object _is_ the Velocity context. So an object that you
put in with

ctx.put("bestellung", oData);

will be referenced as

$bestellung 

on the template. There is no $ctx.

Please try $bestellung.getClass().getName() first, this should report
the class name of the object that you've put into the context.

        Best regards
                Henning

-- 
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen          INTERMETA GmbH
[EMAIL PROTECTED]        +49 9131 50 654 0   http://www.intermeta.de/

RedHat Certified Engineer -- Jakarta Turbine Development  -- hero for hire
   Linux, Java, perl, Solaris -- Consulting, Training, Development

                      4 - 8 - 15 - 16 - 23 - 42

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to