cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy Eltis <ael...@fsmail.net>
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"/>
    </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: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message