I want to define my own taglib that will use the g:datePicker
to generate some of it's output.
class MyTagLib def myTag = {attrs -> // I need to invoke the `datePicker` tag of the the `FormTagLib` tag library // provided by Grails } }
I want to pass along the attributes map when I invoke this tag. When I invoke g:datePicker
I would like it to write it's output directly to the response (just as it does when you invoke it within a GSP).
How can I do this? Thanks.
out << g.datePicker(etc...)
ought to do it. The other taglib prefixes are metaprogrammed in automatically.
If you want to add a body, you need to pass a closure: out<<g.link(action: x, {"This is a link to x"})
or out<<g.link(action: x) {"This is a link to x"}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With