Uploaded image for project: 'Tapestry 5'
  1. Tapestry 5
  2. TAP5-1605

Template parsing of expansions can't handle map expressions

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 5.3
    • 5.3
    • tapestry-core
    • None

    Description

      5.3 introduced map support into the property expression language in the form:

      {'foo': 'bar'}

      .

      Expansion parsing chokes on the syntax, however. It uses a reluctant regular expression to find the closing brace:

      private static final Pattern EXPANSION_PATTERN = Pattern.compile("\\$

      {\\s*(.*?)\\s*}

      ");

      Which means that the use of a map inside an expansion prematurely terminates the exansion:

      ${echoMap(

      {"foo": "bar"}

      )}

      The regex finds the first } and the expression evaluates as:

      echoMap({"foo": "bar"

      Which is clearly incorrect.

      Attachments

        Issue Links

          Activity

            People

              ongakugainochi Robert Zeigler
              ongakugainochi Robert Zeigler
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: