velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Will Glass-Husain" <wgl...@forio.com>
Subject Re: OutOfMemoryException Processing Velocity Template
Date Wed, 11 May 2005 21:06:44 GMT
Well, the #set approach will work with the latest version of Velocity in 
source control.  (If you put the text in quotes).  Or if not, you can use 
the new concatenation operator +.

http://cvs.apache.org/snapshots/velocity/

WILL

----- Original Message ----- 
From: "Llewellyn Falco" <isidore@setgame.com>
To: "Velocity Users List" <velocity-user@jakarta.apache.org>
Sent: Wednesday, May 11, 2005 1:32 PM
Subject: Re: OutOfMemoryException Processing Velocity Template


> Hey we've been using macro's to workaround complex setting issues.
> The problem is that if we use the global defaults, we can't overwrite the 
> marco's and the concept of using them as a variable is lost, and if we 
> turn it on
> props.put("velocimacro.context.localscope", "" + true);
> then the parsed file doesn't seem to have scope to it.
>
> any suggestions, or does anyone know a better way to
> #set ($var =
> many
> lines
> of
> code
> )
>
> thanks,
> llewellyn.
>
>
> example of usage.....
>
> #macro (manyLineOfText)
> this
> prints
> many
> lines
> of
> $randomText
> text
> #end
>
>
> #parse ("someFile")
>
> -------------
> someFile.vm
> -------------
> firstBlock
> #manyLinesOfText()
> secondBlock
> #manyLinesOfText()
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Mime
View raw message