Uploaded image for project: 'Velocity'
  1. Velocity
  2. VELOCITY-62

Macro scope nesting

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.2
    • 1.6
    • Engine
    • None
    • Operating System: other
      Platform: All
    • 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.

      Attachments

        1. Velocity62TestCase.java
          2 kB
          Nathan Bubna

        Activity

          People

            Unassigned Unassigned
            hugg@pobox.com Steven Hugg
            Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: