DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
Taglib Para Grails Que Apoia Na Exibição De Textos Muito Longos
uso:
1. <g:shortDescription size="10">Erico Vicente Marineli</g:shortDescription>
saÃda : Erico Vice...
2. <g:shortDescription size="10">${fieldValue(bean:cargoInstance, field:'descricao')}</g:shortDescription></g:link>
def shortDescription = { attrs, body ->
def str = body.call()
def size = Integer.valueOf(attrs.size)
out << str.getAt(0..(size < str.length() ? size : str.length()) ).trim() + (size < str.length() ? "..." : "")
}





