Skip to content
This repository has been archived by the owner on Feb 27, 2019. It is now read-only.

TabLibSpec Out Is Null (Not returned) #1

Open
bluesliverx opened this issue Jan 12, 2012 · 2 comments
Open

TabLibSpec Out Is Null (Not returned) #1

bluesliverx opened this issue Jan 12, 2012 · 2 comments

Comments

@bluesliverx
Copy link

This may be resolved with Grails 2 since we might not use TagLibSpec...

Currently the code in tag lib spec is this:

  def invokeTag(String name, Map params = [:], Closure body = null) {
    def tag = tagLib."$name"
    def out = (tag.maximumNumberOfParameters == 1 ? tag(params) : tag(params, body)).toString()
    reset()
    out
  }

It should be this (as some tags do not return the 'out' property at all:

  def invokeTag(String name, Map params = [:], Closure body = null) {
    def tag = tagLib."$name"
    if (tag.maximumNumberOfParameters == 1)
      tag(params)
    else
      tag(params, body)
    def out = tagLib.out.toString()
    reset()
    out
  }
@bluesliverx
Copy link
Author

If this would still be an issue in Grails 2 or it deserves a fix for the grails 1.x branch, let me know and I'll submit a pull request. Just let me know if there's another branch or something to submit it to.

@ldaley
Copy link
Member

ldaley commented Oct 31, 2012

There's no branch. The same code is used for both.

Pull request would be much appreciated :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants