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"/>
    </map:generator>

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?

Thanks

Andy

_______________________________________________________________________
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 http://www.freeserve.com/time/anytime



---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

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

Reply via email to