我需要从我的域类中调用静态资源插件(http://www.grails.org/Static+Resources+Plugin).
这在控制器中完美运行:
def tstLink = resourceLinkTo(dir:"docs/${identifier}",file:originalFileName)
Run Code Online (Sandbox Code Playgroud)
但在我获得的域类中
Exception Message: No signature of method: static org.maflt.ibidem.Item.resourceLinkTo() is applicable for argument types: (java.util.LinkedHashMap) values: [[dir:docs/19e9ea9d-5fae-4a35-80a2-daedfbc7c2c2, file:2009-11-12_1552.png]]
Run Code Online (Sandbox Code Playgroud)
我认为这是一个普遍的问题.
那么如何将taglib称为域类中的函数?