From velocity-user-return-11253-qmlist-jakarta-archive-velocity-user=nagoya.apache.org@jakarta.apache.org Tue Jul 01 16:41:57 2003 Return-Path: Delivered-To: apmail-jakarta-velocity-user-archive@apache.org Received: (qmail 37518 invoked from network); 1 Jul 2003 16:41:57 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 1 Jul 2003 16:41:57 -0000 Received: (qmail 18512 invoked by uid 97); 1 Jul 2003 16:44:22 -0000 Delivered-To: qmlist-jakarta-archive-velocity-user@nagoya.betaversion.org Received: (qmail 18505 invoked from network); 1 Jul 2003 16:44:22 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 1 Jul 2003 16:44:22 -0000 Received: (qmail 36875 invoked by uid 500); 1 Jul 2003 16:41:50 -0000 Mailing-List: contact velocity-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Velocity Users List" Reply-To: "Velocity Users List" Delivered-To: mailing list velocity-user@jakarta.apache.org Received: (qmail 36864 invoked from network); 1 Jul 2003 16:41:50 -0000 Received: from web40112.mail.yahoo.com (66.218.78.46) by daedalus.apache.org with SMTP; 1 Jul 2003 16:41:50 -0000 Message-ID: <20030701164153.66986.qmail@web40112.mail.yahoo.com> Received: from [12.147.92.17] by web40112.mail.yahoo.com via HTTP; Tue, 01 Jul 2003 09:41:53 PDT Date: Tue, 1 Jul 2003 09:41:53 -0700 (PDT) From: "Dhruva B. Reddy" Subject: Can't figure out VelocityFormatter To: velocity-user@jakarta.apache.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 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