Skip to content

Instantly share code, notes, and snippets.

@sergiomichels
Created March 7, 2013 21:04
Show Gist options
  • Select an option

  • Save sergiomichels/5111790 to your computer and use it in GitHub Desktop.

Select an option

Save sergiomichels/5111790 to your computer and use it in GitHub Desktop.
Example of overriding tags - not working as expected on Grails 2.2.1
PluginATagLib {
static namespace = "my"
def input = { attrs, body ->
out << attrs
}
}
PluginBTagLib {
static namespace = "my"
static final String INPUT_CLASS = PluginATagLib.class.canonicalName
def input = { attrs, body ->
attrs.changeMe = "CHANGED"
def tagLib = grailsApplication.mainContext.getBean(INPUT_CLASS)
out << tagLib.input.call(attrs, body)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment