I don't want to hijac this thread, but can some one point me to some
where, where I can read more about facelet functions that Andrew talks
about?

It seems pretty useful but searching google or yahoo doesn't give any answers.

Thanks
Mads

On 4/7/06, Andrew Robinson <[EMAIL PROTECTED]> wrote:
> I used <t:buffer and a facelet function.
>
> JSF:
>               <t:buffer into="#{tempStr}">
>                 JSF tags go here
>               </t:buffer>
>               <t:outputText value="#{fn:truncateString(tempStr, 53, '...')}" 
> />
>
> Java:
>   public static String truncateString(String value, int maxLength,
> String terminator)
>   {
>     if (value.length() < maxLength) return value;
>     if (terminator == null) return value.substring(0, maxLength);
>     return value.substring(0, Math.min(0, maxLength -
> terminator.length())) + terminator;
>   }
>
>

Reply via email to