TabLibSpec Out Is Null (Not returned)
bluesliverx opened this issue · comments
Brian Saville commented
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
}
Brian Saville commented
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.
Luke Daley commented
There's no branch. The same code is used for both.
Pull request would be much appreciated :)