You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by "Lindholm, Greg" <gl...@neom.com> on 2006/04/06 19:56:45 UTC
tag to truncate outputText?
Is there a way to truncate outputText and specify the size
you want from a jsp page?
I have an object with a long description property.
When it's listed in a dataTable I want to truncate the
description column to X characters.
Where X can be specified for that column.
I know I can add a getTruncatedDescription() method to the
object but I think a more general facility would be
really useful.
Does anybody have a way or doing this with current tags?
Is this something that could be done with a converter?
Is this something that could be added to <t:outputText> ?
Re: tag to truncate outputText?
Posted by Mike Kienenberger <mk...@gmail.com>.
On 4/6/06, Lindholm, Greg <gl...@neom.com> wrote:
> Is there a way to truncate outputText and specify the size
> you want from a jsp page?
>
> Does anybody have a way or doing this with current tags?
You could create an EL expression, but those aren't supported well in
JSF 1.1. Facelets would make it easy.
> Is this something that could be done with a converter?
String converters aren't allowed in JSF 1.1, but they are in 1.2.
Otherwise a converter would be a good choice.
> Is this something that could be added to <t:outputText> ?
Probably if you provided a patch.