Created
March 7, 2013 21:04
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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