我想定义自己的taglib,它将使用它g:datePicker来生成它的一些输出.
class MyTagLib
def myTag = {attrs ->
// I need to invoke the `datePicker` tag of the the `FormTagLib` tag library
// provided by Grails
}
}
Run Code Online (Sandbox Code Playgroud)
我想在调用此标记时传递属性映射.当我调用时,g:datePicker我希望它将输出直接写入响应(就像在GSP中调用它时一样).
我怎样才能做到这一点?谢谢.
小智 16
如果要添加主体,则需要传递闭包:
out<<g.link(action: x, {"This is a link to x"})
或out<<g.link(action: x) {"This is a link to x"}
| 归档时间: |
|
| 查看次数: |
6264 次 |
| 最近记录: |