velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geir Magnusson Jr <ge...@optonline.net>
Subject Re: Map support in VTL
Date Thu, 10 Oct 2002 21:00:24 GMT
On 10/10/02 10:12 AM, "Mayville, Garth" <Garth.Mayville@bgminteractive.com>
wrote:

> 
> 
> 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.
> 

[taking an irresponsible break from my crushing workload - sorry about my
absence...]

It's hard ot think of any reason why we couldn't support this. Anyone see a
downside?

> 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>
> 

-- 
Geir Magnusson Jr. 
geirm@adeptra.com                                    +1-203-355-2219 (w)
Adeptra Inc.                                         +1-203-247-1713 (m)



--
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