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

"Formal" directive notation

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Incomplete
    • 1.5
    • None
    • Documentation
    • None
    • Operating System: Windows 2000
      Platform: PC
    • 34989

    Description

      Unless it's something I have to enable (and I've seen no mention of that in any
      documentation), I don't believe using curly brackets to surround directives
      actually works. According to
      http://jakarta.apache.org/velocity/user-guide.html#Directives "Like references,
      the name of the directive may be bracketed by a

      { and a }

      symbol." I tried the
      example in that section:

        1. First, a bit I added:
          #set( $a = 1 )
        2. The actual example line:
          #if($a==1)true enough# {else}no way!#end

          The output of this is, unexpectedly:

          true enough#{else}

          no way!

      And if $a is set to 2 (for example), there is no output at all because the
      #

      {else}

      is not spotted.

      Attachments

        Activity

          People

            Unassigned Unassigned
            richard.wiseman@bt.com Richard Wiseman
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: