velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Dekany <>
Subject Re: How to deal with multiple pages (meta-velocity?)
Date Fri, 06 Aug 2004 13:40:57 GMT
Friday, August 6, 2004, 2:43:23 PM, wrote:

> Hi,
> How do you generate multiple pages from a single data structure with 
> Velocity?
> To name a few possibilities:
> - When there are multiple templates, that each lead to 1 target document: 
> run Velocity once for each template (Works well when generating J2EE 
> Remote / RemoteHome interfaces)
> - When there is a single data structure, that leads to multiple documents: 
> iterate the data structure in java source, and run velocity using the same 
> template once for each iteration (Works fine, but requires java 
> programming)
> - A velocimacro: #nestedMerge($rootObject $templateName $outputFileName), 
> that calls a Java method that performs the merge (No experience (yet, this 
> one came up while writing this question))
> Any other possibilities, experiences, comments?

What I did in a file generator utility that uses another similar
template engine (some of the readers will find out which... ;)), so it
possibly works with Velocity as well: there is a Writer where the output
goes. That Writer is a custom Writer subclass, that has a method to
switch the output file, and that method can be invoked from the
templates with a "tool".

Best regards,
 Daniel Dekany

Miert fizetsz az internetert? Korlatlan, ingyenes internet hozzaferes a FreeStarttol.
Probald ki most!

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

View raw message