Here is a sample code that uses the Grails join tag to concatenate items on a list.
<g:join in="['Apple', 'Banana', 'Carrot']" />The output of the code above is this:
Apple, Banana, CarrotSince a separator was not given, the default separator ", " (comma space) is used.
Here is a modified sample code that uses Grails tag but with custom separator.
<g:join in="['Apple', 'Banana', 'Carrot']" delimiter="-" />The output of the code is this:
Apple-Banana-CarrotNote that it uses the given custom delimiter "-" (dash) .