Issue Details (XML | Word | Printable)

Key: VELOCITY-62
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Unassigned
Reporter: Steven Hugg
Votes: 1
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Velocity

Macro scope nesting

Created: 10/Apr/02 07:07 AM   Updated: 03/Sep/08 06:59 PM
Return to search
Component/s: Engine
Affects Version/s: 1.2
Fix Version/s: 1.6

Time Tracking:
Not Specified

File Attachments:
  Size
Java Source File Licensed for inclusion in ASF works Velocity62TestCase.java 2008-09-03 04:52 AM Nathan Bubna 2 kB
Environment:
Operating System: other
Platform: All

Bugzilla Id: 7899
Resolution Date: 03/Sep/08 06:59 PM


 Description  « Hide
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.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Jeff Turner made changes - 13/Sep/05 12:42 PM
Field Original Value New Value
issue.field.bugzillaimportkey 7899 12314932
Will Glass-Husain made changes - 19/Sep/05 02:41 PM
Fix Version/s 1.6 [ 12310290 ]
Bugzilla Id 7899
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.
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.
Assignee Velocity-Dev List [ velocity-dev@jakarta.apache.org ]
Environment Operating System: other
Platform: All
Operating System: other
Platform: All
Henning Schmiedehausen made changes - 05/Nov/06 06:40 PM
Bugzilla Id 7899
Component/s Source [ 12310214 ]
Component/s Engine [ 12311337 ]
Nathan Bubna made changes - 03/Sep/08 04:52 AM
Attachment Velocity62TestCase.java [ 12389410 ]
Nathan Bubna made changes - 03/Sep/08 06:59 PM
Resolution Fixed [ 1 ]
Status Open [ 1 ] Resolved [ 5 ]