RE: [Modelj-developer] Re: making first letter lower case
Status: Beta
Brought to you by:
tom_tessier
|
From: O'Reilly J. <Joh...@tr...> - 2003-01-20 14:20:49
|
I got this working by using the jakarta commons lang StringUtils class (it has a uncapitilise method that does the job). I placed an instance of this class in the context in GeneratorTask.java. -John > -----Original Message----- > From: Tom Tessier [SMTP:tom...@ho...] > Sent: 17 January 2003 14:44 > To: mod...@li... > Subject: [Modelj-developer] Re: making first letter lower case > > You should be able to access it the same way you access the other > StringUtils classes, by using the $strings modifier.. eg) > > $strings.capitalizeFirstLetter($bean.name) > > Or if you made a new method uncapitalizeFirstLetter() method: > > $strings.uncapitalizeFirstLetter($bean.name) > > I'm not totally sure though, I've never subclasses it myself :) You could > always edit the StringUtils source-code directly and repackage the > velocity.jar.. at one pointed I wanted to do the same thing (make first > character lowercase), but I compromised and just made the whole string > lowercase.. > > Tom > > >From: O'Reilly John <Joh...@tr...> > >To: 'Tom Tessier' <tom...@ho...> > >Subject: RE: [Modelj-developer] Re: making first letter lower case > >Date: Fri, 17 Jan 2003 14:02:15 -0000 > >MIME-Version: 1.0 > >Received: from startgwyex01.traventec.com ([193.120.171.248]) by > >mc10-f9.bay6.hotmail.com with Microsoft SMTPSVC(5.0.2195.5600); Fri, 17 > Jan > >2003 06:16:51 -0800 > >Received: by STARTGWYEX01 with Internet Mail Service (5.5.2650.21)id > ><DDDY8ZBM>; Fri, 17 Jan 2003 14:02:18 -0000 > >Message-ID: <2099D12F8AC1D411BD7C00508B0BF5DD01C65410@STARTGWYEX01> > >X-Mailer: Internet Mail Service (5.5.2650.21) > >Return-Path: Joh...@tr... > >X-OriginalArrivalTime: 17 Jan 2003 14:16:52.0036 (UTC) > >FILETIME=[14BD6040:01C2BE33] > > > >If I do that, how do I made the subclass accessible from within the .vm > >files (sorry if this is a basic velocity question)? > > > >John > > > > > > > -----Original Message----- > > > From: Tom Tessier [SMTP:tom...@ho...] > > > Sent: 17 January 2003 13:08 > > > To: mod...@li... > > > Subject: [Modelj-developer] Re: making first letter lower case > > > > > > Not that I know of.. you could always extend the > > > org.apache.velocity.util.StringUtils class and provide a > > > lowercaseFirstLetter() method to compliment the > capitalizeFirstLetter() > > > method. > > > > > > Tom > > > > > > > > > > > > > > > >From: O'Reilly John <Joh...@tr...> > > > >To: "'mod...@li...'" > > > ><mod...@li...> > > > >Subject: [Modelj-developer] making first letter lower case > > > >Date: Fri, 17 Jan 2003 11:00:49 -0000 > > > >MIME-Version: 1.0 > > > >Received: from sc8-sf-list2.sourceforge.net ([66.35.250.206]) by > > > >mc4-f6.law16.hotmail.com with Microsoft SMTPSVC(5.0.2195.5600); Fri, > 17 > > > Jan > > > >2003 03:15:05 -0800 > > > >Received: from sc8-sf-list1-b.sourceforge.net ([10.3.1.13] > > > >helo=sc8-sf-list1.sourceforge.net)by sc8-sf-list2.sourceforge.net > with > > > >esmtp (Exim 3.31-VA-mm2 #1 (Debian))id 18ZUSn-0008F1-00; Fri, 17 Jan > >2003 > > > > > > >03:15:05 -0800 > > > >Received: from [193.120.171.248] (helo=startgwyex01.traventec.com)by > > > >sc8-sf-list1.sourceforge.net with esmtp (Exim 3.31-VA-mm2 #1 > >(Debian))id > > > >18ZUSO-0003Np-00for <mod...@li...>; Fri, 17 > > >Jan > > > > > > >2003 03:14:40 -0800 > > > >Received: by STARTGWYEX01 with Internet Mail Service (5.5.2650.21)id > > > ><DDDY8YXX>; Fri, 17 Jan 2003 11:00:50 -0000 > > > >Message-ID: <2099D12F8AC1D411BD7C00508B0BF5DD01C6540D@STARTGWYEX01> > > > >X-Mailer: Internet Mail Service (5.5.2650.21) > > > >Sender: mod...@li... > > > >Errors-To: mod...@li... > > > >X-BeenThere: mod...@li... > > > >X-Mailman-Version: 2.0.9-sf.net > > > >Precedence: bulk > > > >List-Help: > > > ><mailto:mod...@li...?subject=help> > > > >List-Post: <mailto:mod...@li...> > > > >List-Subscribe: > > > > > > ><https://lists.sourceforge.net/lists/listinfo/modelj-developer>,<mailto:m > > > ode...@li...?subject=subscribe> > > > >List-Id: <modelj-developer.lists.sourceforge.net> > > > >List-Unsubscribe: > > > > > > ><https://lists.sourceforge.net/lists/listinfo/modelj-developer>,<mailto:m > > > ode...@li...?subject=unsubscribe> > > > >List-Archive: > > > ><http://sourceforge.net/mailarchive/forum.php?forum=modelj-developer> > > > >Return-Path: mod...@li... > > > >X-OriginalArrivalTime: 17 Jan 2003 11:15:06.0027 (UTC) > > > >FILETIME=[B04077B0:01C2BE19] > > > > > > > >Hi, > > > >Is there any way in velocity to make just the first letter of a > >variable > > > >lower case (and leave the rest untouched). > > > >John > > > > > > > > > > >************************************************************************ > > > >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. > > > > > > > > > > > >------------------------------------------------------- > > > >This SF.NET email is sponsored by: Thawte.com > > > >Understand how to protect your customers personal information by > > > >implementing > > > >SSL on your Apache Web Server. Click here to get our FREE Thawte > Apache > > > >Guide: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0029en > > > >_______________________________________________ > > > >Modelj-developer mailing list > > > >Mod...@li... > > > >https://lists.sourceforge.net/lists/listinfo/modelj-developer > > > > > > > > > _________________________________________________________________ > > > MSN 8 with e-mail virus protection service: 2 months FREE* > > > http://join.msn.com/?page=features/virus > > > > > > > > > > > > ------------------------------------------------------- > > > This SF.NET email is sponsored by: Thawte.com > > > Understand how to protect your customers personal information by > > > implementing > > > SSL on your Apache Web Server. Click here to get our FREE Thawte > Apache > > > Guide: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0029en > > > _______________________________________________ > > > Modelj-developer mailing list > > > Mod...@li... > > > https://lists.sourceforge.net/lists/listinfo/modelj-developer > >************************************************************************ > >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. > > > _________________________________________________________________ > Add photos to your e-mail with MSN 8. Get 2 months FREE*. > http://join.msn.com/?page=features/featuredemail > > > > ------------------------------------------------------- > This SF.NET email is sponsored by: Thawte.com - A 128-bit supercerts will > allow you to extend the highest allowed 128 bit encryption to all your > clients even if they use browsers that are limited to 40 bit encryption. > http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0030en > _______________________________________________ > Modelj-developer mailing list > Mod...@li... > https://lists.sourceforge.net/lists/listinfo/modelj-developer ************************************************************************ 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. |