1. Create a tab lib (grails-app/taglib)
2. Extend with ValidationTagLib
3. Example
2. Extend with ValidationTagLib
3. Example
package com.test.taglib import org.codehaus.groovy.grails.plugins.web.taglib.ValidationTagLib class MyCustomTagLib extends ValidationTagLib { static validationTagLibStatic = null static namespace = "g" Closure message = { attrs -> ValidationTagLib validationTagLib = validationTagLibStatic ?: (validationTagLibStatic = grailsAttributes.applicationContext.getBean('org.codehaus.groovy.grails.plugins.web.taglib.ValidationTagLib')) validationTagLib.message.call(attrs) } }
No comments:
Post a Comment