Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.2
    • Fix Version/s: 1.6
    • Component/s: Engine
    • Labels:
      None
    • Environment:
      Operating System: other
      Platform: All

      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.

        Activity

        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12551840 ] jira [ 12552640 ]
        Mark Thomas made changes -
        Workflow jira [ 12324937 ] Default workflow, editable Closed status [ 12551840 ]
        Nathan Bubna made changes -
        Resolution Fixed [ 1 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Nathan Bubna made changes -
        Attachment Velocity62TestCase.java [ 12389410 ]
        Henning Schmiedehausen made changes -
        Component/s Engine [ 12311337 ]
        Component/s Source [ 12310214 ]
        Bugzilla Id 7899
        Will Glass-Husain made changes -
        Environment Operating System: other
        Platform: All
        Operating System: other
        Platform: All
        Assignee Velocity-Dev List [ velocity-dev@jakarta.apache.org ]
        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.
        Bugzilla Id 7899
        Fix Version/s 1.6 [ 12310290 ]
        Jeff Turner made changes -
        Field Original Value New Value
        issue.field.bugzillaimportkey 7899 12314932
        Steven Hugg created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            Steven Hugg
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development