Re: The new map syntax
Keats Kirsch <[email protected]> Fri, 18 Nov 2005 10:24:11 -0500
| Newsgroups | gmane.comp.java.webmacro.user |
|---|---|
| Message-ID | <[email protected]> |
I would be a nice enhancement to allow one to configure the map
implementation, but I think it would be a mistake to rely on
non-standard map behavior from the generic map syntax.
However you can use the new #setprops directive to get what you want.
see: http://www.webmacro.org/SetpropsDirective
You could do something like:
#setprops $map class="java.util.LinkedHashmap" {
k1: v1
k2: v2
}
Hope this helps.
Keats
Nikhil G. Daddikar wrote:
> I like the new #set $map = { k1: v1, k2:v2 } syntax. The only problem
> is that it does not use the "List Ordered" Map i.e. when I want to
> say render a select list from it, it shows things not in the order in
> which the map was defined. Is there a way where I can specify the
> implementation class to use? I use JDK 1.5 and would like to specify
> the LinkedHashMap.
>
> Any help and pointers would be appreciated.
>
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today
Register for a JBoss Training Course. Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click