velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dhruva B. Reddy" <sledgehammer2...@yahoo.com>
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:

    $thingie.getStuff()

I get the expected output.

Can someone tell me what I'm doing wrong?

Thanks,
Dhruva

__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Mime
View raw message