velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mayville, Garth" <Garth.Mayvi...@bgminteractive.com>
Subject RE: Map support in VTL
Date Thu, 10 Oct 2002 14:12:29 GMT


We found the same issues, and used the same work around. Our systems are
highly dependant on Maps, and "lack of a Map in the syntax" is the one
area the velocity didn't really satisfy our needs.

Garth

-----Original Message-----
From: Aapo Laakkonen [mailto:aapo.laakkonen@giro.fi] 
Sent: Wednesday, October 09, 2002 9:22 PM
To: 'Velocity Users List'
Subject: RE: Map support in VTL

>> You know, you could write a Java factory object that parses the text 
>> and returns a Map, and just drop that Java object into the context?
>> 
>> #set( $myMap = $MapFactory.build("{ "one"=1, "two"=2, "three"=3 }"))
>
> A slight variation to the above is to use the array syntax like this:
>    #set( $myMap = $MapFactory.build(["one=1", "two=2", "three=3"]) )

Wonderful! I'll try that tomorrow. It seems "zero killed" to me, :-).

Thanks!


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


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


Mime
View raw message