December 2013
Beginner to intermediate
222 pages
5h 13m
English
Now we need to add nesting to our message list in order to visualize the various threads in our forum. We’ll do this with a custom GSP tag. If you’ve ever written custom JSP tags or JSF components, come out from under the table. It’s not like that at all. But just to reassure you, before we get started on our custom tag, we’ll take a brief look at what it takes (or more important perhaps, doesn’t take) to create a GSP tag.
The first step is to create a TagLib. A TagLib is a Groovy class with a name ending in (surprise, surprise!) TagLib, and it lives in the grails-app/taglib directory. Grails provides a convenience script to create this for us:
| | $ grails create-tag-lib ... |
Read now
Unlock full access