Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0 final
    • Fix Version/s: 2.0.1, 2.1-RC1
    • Component/s: TagLib
    • Labels:

      Description

      Nesting two custom taglibs in a GSP leads to different behaviour between 1.3.7 and 2.0.0. See the following example:

      <test:test1>
          <test:test2>
              ${test1} ${test2}
          </test:test2>
      </test:test1>
      
      class TestTagLib {
      
          static namespace = "test"
      
          def test1 = { attrs, body ->
              out << body(test1:1)        
          }
      
          def test2 = { attrs, body ->
              out << body(test2:2)
          }
      }
      

      Output in grails 1.3.7:

      1 2

      Output in grails 2.0.0:

      1

      I couldn't find a note on this, so I assume this is unexpected behaviour.

        Activity

        Hide
        Phil DeJarnett added a comment -

        Just to add a comment to this: if the parent tag doesn't provide properties to body(), then the child tag's properties work. But if the parent passes in properties, then the child tag's properties are ignored.

        Show
        Phil DeJarnett added a comment - Just to add a comment to this: if the parent tag doesn't provide properties to body() , then the child tag's properties work. But if the parent passes in properties, then the child tag's properties are ignored.
        Hide
        Lari Hotari added a comment -

        I committed a fix and a new test for this usecase.

        Show
        Lari Hotari added a comment - I committed a fix and a new test for this usecase.
        Hide
        Christopher Rudolf added a comment -

        Great, thank you very much.

        Show
        Christopher Rudolf added a comment - Great, thank you very much.

          People

          • Assignee:
            Lari Hotari
            Reporter:
            Christopher Rudolf
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Last Reviewed:

              Development