cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy Eltis <>
Subject Velocity
Date Wed, 12 Dec 2001 14:27:56 GMT
Hi all

I'm trying to use Velocity in Cocoon 2. I would like to add objects to the VelocityContext
without having to change the VelocityGenerator class (where I can add them explicitly, I know).

>From what I understand reading the doc I should be able to declare the object (Menu) in
the sitemap as follows:

    <map:generator name="velocity" src="org.apache.cocoon.generation.VelocityGenerator">
      <export-object key="com.idl.quasar.generation.velocity.Menu" name="menu"/>

However, this doesn't seem to work,as references to 'menu' in my velocity template (eg  item:
$menu.Item , test: $menu.Test)
are ignored. The same Menu object instantiated and added to the context in the VelocityGenerator
works ok.

Does anybody have any ideas what I'm doing wrong?



Never pay another Internet phone bill!
Freeserve AnyTime, for all the Internet access you want, day and night, only £12.99 per month.
Sign-up at

Please check that your question has not already been answered in the
FAQ before posting. <>

To unsubscribe, e-mail: <>
For additional commands, e-mail: <>

View raw message