Grails
  1. Grails
  2. GRAILS-8569

g:set doesn't work in tag body if body is called with arguments

    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: None
    • Labels:
      None

      Description

      g:set doesn't work in tag body if body is called with arguments

      example:

      taglib

       class ExampleTagLib {
          def bodytag = { attrs, body ->
              if (attrs.model)
                  out << body(attrs.model)
              else
                  out << body()
          }
       }
      

      This gsp

      <g:bodytag><g:set var="a" value="1"/></g:bodytag><g:bodytag model="[c:3]"><g:set var="b" value="2"/></g:bodytag>${a} ${b} ${c}
      

      should output "1 2 "

        Activity

        There are no comments yet on this issue.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:
              Last Reviewed:

              Development