Hi Andreas,

Sorry to have inconvenienced you with this change.  The old behavior
was causing problems and had some notable flaws (see my discussion of
the quirks in https://issues.apache.org/jira/browse/VELOCITY-681).
There are no clean workarounds to recover the proxying behavior.  You
can set the original reference directly if you know it, of course, but
that could get messy if a variety of references are passed in.   You
might also restructure to pass in references to objects or maps so
that changes to the referenced variable are seen in the original
reference when #set on the macro argument reference to that variable.
I know neither of these is ideal.

Sorry.

On Thu, Jun 2, 2011 at 4:04 AM, Andreas Bohnert <a...@weberhofer.at> wrote:
> hello velocity user list,
>
> from the 1.7 release on we can not change the value of the original
> reference of a macro argument anymore.
>
> this is the change log description:
> Calling #set on a macro argument (for which a #set-able reference was
> passed) will no longer propagate the new value to the original reference,
> but merely set the value of the macro argument reference. This was an
> obscure, infrequently used feature and was decided to be more problematic
> and unpredictable than useful.
>
> so, is there still a way to change the value of the original reference if I
> want to? any workaround?
> my knowledge of velocity is limited. I have read this one:
> http://wiki.apache.org/velocity/MacroEvaluationStrategy
> but I still did not manage to change the value.
>
> any help/example is very much appreciated!!
> regards, Andreas
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@velocity.apache.org
> For additional commands, e-mail: user-h...@velocity.apache.org
>
>

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

Reply via email to