Type: New Feature
Affects Version/s: 1.3.6
Fix Version/s: None
A common need in GSPs is to shorten long text with elipsis ...
I know it's not that difficult for app developers to add a method to String metaclass or mixin StringUtils from Commons Lang in BootStrap. But I think this is so common that a standard grails tag must support it.
I can see two alternatives:
- add optional int parameter "abbreviate" to the existing fieldValue tag.
- add a new "abbreviate" tag with "bean" and "field" parameters like fieldValue and a "maxlength" parameter to set max text length.
See abbreviate method in http://commons.apache.org/lang/api-2.5/org/apache/commons/lang/StringUtils.html