Uploaded image for project: 'Jetspeed 2 (Retired)'
  1. Jetspeed 2 (Retired)
  2. JS2-1093

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.2.0
    • 2.2.1
    • Admin Portlets, Layout
    • 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

      Attachments

        Activity

          People

            woon_san Woonsan Ko
            woon_san Woonsan Ko
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: