Created
July 24, 2010 23:02
-
-
Save iamnoah/489065 to your computer and use it in GitHub Desktop.
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
| import groovy.xml.MarkupBuilder; | |
| class FrameworkTagLib { | |
| static namespace = "ajax" | |
| def include = { attrs -> | |
| def controller = attrs.controller, action = attrs.action, id = attrs.id | |
| def component = "${controller}-${action}" + (id ? "-${id}" : "") | |
| out << """<div id="${component}" class="ajax-component">""" | |
| out << g.include(attrs) | |
| out << "</div>" | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment