You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Bob Schellink <sa...@gmail.com> on 2011/01/29 02:18:10 UTC

Re: [ANNOUNCE] Apache Velocity Engine 1.7

Hi all,

Just wanted to thank the Velocity committers for this excellent release. I've upgraded Apache Click
without a hitch and the new features and bug fixes are great. Especially welcome is the "$.x" fix
for jQuery and other JS frameworks.

Kind regards

Bob

On 1/12/2010 17:46, Nathan Bubna wrote:
> The Apache Velocity Team announces the immediate availability of the
> of Apache Velocity Engine 1.7.  This release is fully compatible with
> the previous release and includes significant improvements in
> performance, stability and features.
> 
> Apache Velocity is well-known in the Java field as a lightweight,
> easy-to-use templating library for creating dynamic web sites and
> performing other text-generation tasks.
> 
> Much work in this release has gone to making Velocity more
> user-friendly, adding some long-desired features and improving many
> others.  Apart from this, numerous bugs were fixed (both common and
> obscure), deprecation warnings were added to push people toward the
> eventual 2.0 version, and performance continues to be improved.  Some
> details are listed below:
> 
> * There are four new syntax features:
>  - #[[ This is a literal text block.  It is not parsed, but directly
> fed into the output. ]]#
>  - #@yourMacro() can now have body content.  Just remember to add the
> @ when calling it with a body! #end
>  - You can use brackets to get and set values in lists (and arrays).
> e.g. #set( $foo[2] = $bar[$i] )
>  - Quotes, both single and double, may be escaped in string literals
> via doubling.  e.g.  #set( $foo = "Like ""this""!" )
> 
> * There are five notable deprecations:
>  - $velocityCount should be changed to $foreach.index (0-base) or
> $foreach.count (1-base)
>  - $velocityHasNext should be changed to $foreach.hasNext,
> $foreach.last or $foreach.first
>  - The #literal directive has been replaced by #[[ the much superior
> textblock ]]#
>  - The velocimacro.context.localscope setting is being phased out;
> please get/set local #macro references as members of the optional,
> context-aware and self-documenting $macro "namespace" object.  (e.g.
> #set( $macro.foo = 'bar' ) and $macro.foo).  Enable this by setting
> macro.provide.scope.control=true in your properties.
>  - The directive.evaluate.context.class setting is being phased out;
> please get/set local #evaluate references as members of the $evaluate
> "namespace" object.  Enable this by setting
> evaluate.provide.scope.control=true in your properties.
> 
> * The are three important changes:
>  - The #stop directive now stops rendering instead of parsing, making
> it much more useful.
>  - The #break directive can now be used in any scope, not just in a
> nested #foreach.  It will terminate the nearest content "block",
> whether a directive, a macro body, or an entire template.
>  - All templates, standard block (aka "content") directives, macros,
> macro bodies, #evaluate content and #define blocks can be easily
> configured to have an automatically-provided, context-aware and
> self-documenting namespace reference in which you can safely and
> securely #set and get any "local" references to keep them out of the
> global context.
> 
> See the change log for a more complete explanation of any and all of
> these, or ask us about them at user@velocity.apache.org.
> 
> Documentation Velocity 1.7 can be found here:
>  http://velocity.apache.org/engine/releases/velocity-1.7/
> 
> The change log is here:
>  http://velocity.apache.org/engine/releases/velocity-1.7/changes-report.html
> 
> Apache Velocity 1.7 can be downloaded here:
>  http://velocity.apache.org/download.cgi
> 
> For the Apache Velocity Team
>  Nathan Bubna


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