cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McKibben <mmckib...@ncube.com>
Subject Re: How do I add objects to the objectModel Map
Date Fri, 21 Dec 2001 18:28:18 GMT

This feature is for exporting objects already in the Cocoon object map
to
the Velocity template context. So they must already exist. But let's say
you knew that, then in your sitemap, here is how you would make some
object named "myBusinessObject" in the cocoon object map available to
your
velocity template as "$myBusinessObject":

(in your sitemap.xmap)
<generators default="file">
 ...
 <generator name="velocity"
src="org.apache.cocoon.generation.VelocityGenerator" pool-max="32"
pool-min="16" pool-grow="4">
   <export-object key="myBusinessObject" name="myBusinessObject"/>
 </generator>
 ...
 </generators>

Hope this helps!

--mike

On Tue, 18 Dec 2001 david.greaves@idl-bt.com wrote:

> Hi
>
> I hope this is straightforward...
>
> How do I add objects to the objectModel Map?
>
>
http://xml.apache.org/cocoon/userdocs/generators/velocity-generator.html
> says:
> <export-object key="objectMapKey" name="velocityContextName"/>
(optional;
> 0..n) - Export the object specified by key from the Cocoon object map
to the
> Velocity context of the template. The object can be accessed from the
> template as name. Be careful to use a valid VTL variable name.
>
> I've looked through the code but can't figure this one out.
>
> David
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
>


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


Mime
View raw message