Put an instance of it into your Context.

Peter

> -----Original Message-----
> From: O'Reilly John [mailto:[EMAIL PROTECTED]] 
> Sent: Monday, January 20, 2003 10:26 AM
> To: 'Velocity Developers List'
> Subject: RE: uncapitalizeFirstLetter
> 
> 
> I'm sorry if this is a basic question but how do you use an 
> 'external' class (such as the commons StringUtils mentioned 
> below) within a velocity .vm file?
> 
> -John
> 
> 
> > -----Original Message-----
> > From:       robert burrell donkin 
> [SMTP:[EMAIL PROTECTED]]
> > Sent:       18 January 2003 10:19
> > To: Velocity Developers List
> > Subject:    Re: uncapitalizeFirstLetter
> > 
> > just FYI
> > 
> > jakarta-commons-lang 
> (http://jakarta.apache.org/commons/lang.html) has 
> > an
> > extended version of StringUtils that you might like to look 
> at. i think 
> > that it's uncapitalize method should do what you want.
> > 
> > - robert
> > 
> > On Friday, January 17, 2003, at 05:56 PM, O'Reilly John wrote:
> > 
> > > Hi,
> > >
> > > Would it be possible to add a new method 
> (uncapitalizeFirstLetter) 
> > > to org/apache/velocity/utils/StringUtils.java - source included 
> > > below.
> > This
> > > is
> > > required when referring to java beans in a jsp file e.g. getting 
> > > from 'UserInfo' to 'userInfo'.
> > >
> > > John
> > >
> > >
> > >     /**
> > >      * <p>
> > >      * un-Capitalize the first letter but leave the rest 
> as they are.
> > >      * </p>
> > >      *
> > >      * <p>
> > >      *  For example <code>fooBar</code> becomes 
> <code>FooBar</code>.
> > >      * </p>
> > >      *
> > >      * @param data uncapitalize this
> > >      * @return String
> > >      */
> > >     static public String uncapitalizeFirstLetter ( String data )
> > >     {
> > >         String firstLetter = data.substring(0,1).toLowerCase();
> > >         String restLetters = data.substring(1);
> > >         return firstLetter + restLetters;
> > >     }
> > >
> > >
> > > 
> ********************************************************************
> > > ****
> > > This e-mail and any files transmitted with it are 
> confidential and may
> > be
> > > privileged and are intended solely for the individual 
> named/ for the 
> > > use
> > 
> > > of
> > > the individual or entity to whom they are addressed.If 
> you are not 
> > > the intended addressee, you should not disseminate, distribute or 
> > > copy this e-mail.Please notify the sender immediately if you have 
> > > received this e-mail by mistake and delete this e-mail from your 
> > > system.If you are not the intended recipient, you are 
> notified that 
> > > reviewing, disclosing,
> > copying,
> > > distributing or taking any action in reliance on the contents of 
> > > this
> > > e-mail
> > > is strictly prohibited.Please note that any views or 
> opinions expressed
> > in
> > > this e-mail are solely those of the author and do not necessarily
> > > represent
> > > those of Traventec Limited.E-mail transmission cannot be 
> guaranteed to
> > be
> > > secure or error-free as information could be intercepted, 
> corrupted,
> > lost,
> > > destroyed, or arrive late or incomplete.Traventec Limited 
> therefore 
> > > does
> > 
> > > not
> > > accept liability for any errors or omissions in the 
> contents of this 
> > > message, which arise as a result of e-mail transmission.The 
> > > recipient should check this e-mail and any attachments for the 
> > > presence of viruses.This e-mail has been swept for 
> computer viruses 
> > > however Traventec Limited accepts
> > > no liability for any damage caused by any virus 
> transmitted by this 
> > > e-mail.
> > >
> > > --
> > > To unsubscribe, e-mail:
> > <mailto:[EMAIL PROTECTED].
> > > org>
> > > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED].
> > > org>
> > >
> > 
> > 
> > --
> > To unsubscribe, e-mail: 
> > <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail: 
> > <mailto:[EMAIL PROTECTED]>
> **************************************************************
> **********
> This e-mail and any files transmitted with it are 
> confidential and may be privileged and are intended solely 
> for the individual named/ for the use of the individual or 
> entity to whom they are addressed.If you are not the intended 
> addressee, you should not disseminate, distribute or copy 
> this e-mail.Please notify the sender immediately if you have 
> received this e-mail by mistake and delete this e-mail from 
> your system.If you are not the intended recipient, you are 
> notified that reviewing, disclosing, copying, distributing or 
> taking any action in reliance on the contents of this e-mail 
> is strictly prohibited.Please note that any views or opinions 
> expressed in this e-mail are solely those of the author and 
> do not necessarily represent those of Traventec 
> Limited.E-mail transmission cannot be guaranteed to be secure 
> or error-free as information could be intercepted, corrupted, 
> lost, destroyed, or arrive late or incomplete.Traventec 
> Limited therefore does not accept liability for any errors or 
> omissions in the contents of this message, which arise as a 
> result of e-mail transmission.The recipient should check this 
> e-mail and any attachments for the presence of viruses.This 
> e-mail has been swept for computer viruses however Traventec 
> Limited accepts no liability for any damage caused by any 
> virus transmitted by this e-mail.
> 
> --
> To unsubscribe, e-mail:   
> <mailto:velocity-dev-> [EMAIL PROTECTED]>
> For 
> additional commands, 
> e-mail: <mailto:[EMAIL PROTECTED]>
> 


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to