Jetspeed 2
  1. Jetspeed 2
  2. JS2-1093

To use #parse() velocity macro can cause unexpected behavior with Velocity 1.5

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.0
    • Fix Version/s: 2.2.1
    • Component/s: Admin Portlets, Layout
    • Labels:
      None

      Description

      I think it hasn't been a good practice to use "#parse" macro in header.vm to use velocity macros with Velocity 1.5.
      In the documentation of Velocity 1.5, it says, "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." [1] By the way, we cannot use velocitymacro.library facility because each layout decorator should be able to have each own macros.
      Luckily, by the way, Velocity 1.6 seems to have already resolved this problem!
      It says, "Yes! This became possible in Velocity 1.6." in the same section. [2]

      Therefore, I'd like to try to upgrade the velocity version to 1.6.3.

      [1] http://velocity.apache.org/engine/releases/velocity-1.5/user-guide.html#velocimacro_miscellany
      [2] http://velocity.apache.org/engine/releases/velocity-1.6.2/user-guide.html#Velocimacro_Miscellany

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Woonsan Ko
            Reporter:
            Woonsan Ko
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development