Grails 2.2.2使用自己的标签lib时出错

时间:2013-06-25 07:12:08

标签: grails taglib

我创建了自己的标签库。在使用时我得到错误:

java.lang.RuntimeException: org.codehaus.groovy.runtime.InvokerInvocationException: groovy.lang.MissingMethodException: No signature of method: org.codehaus.groovy.grails.commons.DefaultGrailsApplication.isArtefactOfType() is applicable for argument types: (java.lang.String, org.springframework.core.io.FileSystemResource) values: [TagLib, file [D:\domain\grails-app\taglib\ext\domain\DomainTagLib.groovy]]

可能的解决方案:isArtefactOfType(java.lang.String,java.lang.Class),isArtefactOfType(java.lang.String,java.lang.String)

TagLib的来源:

package ext.domain
class DomainTagLib {

    def contractorFullReq = {attrs, body ->
        def Organization organization = attrs?.organization
        out << organization?.shortName
    }
}

0 个答案:

没有答案