You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "Will Glass-Husain (JIRA)" <ji...@apache.org> on 2005/09/19 07:41:54 UTC

[jira] Updated: (VELOCITY-62) Macro scope nesting

     [ http://issues.apache.org/jira/browse/VELOCITY-62?page=all ]

Will Glass-Husain updated VELOCITY-62:
--------------------------------------

    Bugzilla Id:   (was: 7899)
    Fix Version: 1.6
    Description: 
A problem with recursing macros is that scopes are not nested 
when "velocimacro.context.localscope" is set to true.  That is, a get() on a 
context does not percolate to a parent context if the get() returns null.  This 
prevents accessing global variables in the context.  The desired behavior 
(IMHO) would be for set()s to be local to the macro, and get()s to percolate up 
to the parent if not found.

  was:
A problem with recursing macros is that scopes are not nested 
when "velocimacro.context.localscope" is set to true.  That is, a get() on a 
context does not percolate to a parent context if the get() returns null.  This 
prevents accessing global variables in the context.  The desired behavior 
(IMHO) would be for set()s to be local to the macro, and get()s to percolate up 
to the parent if not found.

    Environment: 
Operating System: other
Platform: All

  was:
Operating System: other
Platform: All

      Assign To:     (was: Velocity-Dev List)

Seems easy enough to do.   "The desired behavior (IMHO) would be for set()s to be local to the macro, and get()s to percolate up to the parent if not found."   Suggest v1.6

> Macro scope nesting
> -------------------
>
>          Key: VELOCITY-62
>          URL: http://issues.apache.org/jira/browse/VELOCITY-62
>      Project: Velocity
>         Type: Improvement
>   Components: Source
>     Versions: 1.2
>  Environment: Operating System: other
> Platform: All
>     Reporter: Steven Hugg
>     Priority: Minor
>      Fix For: 1.6

>
> A problem with recursing macros is that scopes are not nested 
> when "velocimacro.context.localscope" is set to true.  That is, a get() on a 
> context does not percolate to a parent context if the get() returns null.  This 
> prevents accessing global variables in the context.  The desired behavior 
> (IMHO) would be for set()s to be local to the macro, and get()s to percolate up 
> to the parent if not found.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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