Velocity variables are Java objects, on which you can call any
(public) method you could call in a Java program. In your case, the
$input variable is a String, so you can call $input.toLowerCase().
Whenever you have a variable in Velocity, and don't know what to do
with it, here are some tips:
1. Write $myUnknownVar.class and view the result. This will show you
the class of that object.
2. Look at the public methods that class offers.
3. Found the method you were looking for? Call it: $myUnknownVar.doSomething()
Sergiu.
On 5/10/07, evelyne24(a)gmail.com <evelyne24(a)gmail.com> wrote:
Hello all,
I wrote a post on xwiki-users this morning, because someone told me there is where the
questions about "how to" are supposed to go, but nobody answered (and I figured
it out by myself, with the help of Sergiu) so I'll try my luck here, as I really need
some help.
In a velocity script I receive a request and I take the value with #set($input
=$request.get("param")).
My question is, how can I apply string transformations (i.e to lowercase, split the
string etc) to this variable($input) in velocity? I looked everywhere but I guess I miss
something. Please help!
Thank you,
Evelina Slatineanu
--
http://purl.org/net/sergiu