velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aapo Laakkonen" <aapo.laakko...@giro.fi>
Subject RE: Map support in VTL
Date Thu, 10 Oct 2002 01:21:50 GMT
>> 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>


Mime
View raw message