velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dhruva B. Reddy" <>
Subject Can't figure out VelocityFormatter
Date Tue, 01 Jul 2003 16:41:53 GMT
I am trying to use the VelocityFormatter class.  I have the following
in my Java code:

    context.put("formatter", new VelocityFormatter(context));
    context.put("thingie", stuff);

In the template, I have the following:

    $formatter.limitLen(2, $thingie.getStuff())

This method call throws a StringIndexOutOfBoundsException.  Yet, when I
just have the following in the template:


I get the expected output.

Can someone tell me what I'm doing wrong?


Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message