Uploaded image for project: 'Tiles'
  1. Tiles
  2. TILES-502

wildcarding works in put-attribute@value but not in put-attribute@expression

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.2.2
    • 2.2.2
    • tiles-core
    • None
    • Patch

    Description

      This works:
      <definition name="REGEXP[^.]+)">
      <put-attribute name="something" value="some-

      {1}.jsp"
      </definition>

      but this does not:
      <definition name="REGEXP[^.]+)">
      <put-attribute name="something" expression="some-{1}

      -${requestScope.someVariable}.jsp"
      </definition>

      Attached is a patch, albeit that
      st = st.replaceAll("'", "'''").replaceAll("\\Q${
      E", "
      $'{'");
      definitely should be improved with something from javax.el that escapes
      the el before pushing it through the MessageFormat.
      But going down this path it should be made pluggable so that the various
      registered attributeEvaluators are called to do the appropriate
      escaping.

      Attachments

        1. tiles-502.patch
          2 kB
          Michael Semb Wever

        Activity

          People

            brenmcguire Antonio Petrelli
            mck Michael Semb Wever
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: