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

can't load macros in file loaded with #parse

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.4
    • 1.6
    • Engine
    • None
    • Operating System: All
      Platform: All
    • 33750

    Description

      I think this is a big bug. I've used velocity in my projects, erveything is ok
      but this. i want to know it's this problem will be resolved in next version? if
      it's not, i have to abandon velocity.
      the bug is :
      from doc:
      This is important to remember if you try to #parse() a template containing
      inline #macro() directives. Because the #parse() happens at runtime, and the
      parser decides if a VM-looking element in the template is a VM at parsetime,
      #parse()-ing a set of VM declarations won't work as expected. To get around
      this, simply use the velocimacro.library facility to have Velocity load your
      VMs at startup.

      Attachments

        1. patch.zip
          23 kB
          Supun Kamburugamuva
        2. small.patch
          0.7 kB
          Supun Kamburugamuva

        Issue Links

          Activity

            People

              Unassigned Unassigned
              whxbb whxbb
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: