Re: The new map syntax
Lane Sharman <[email protected]> Tue, 22 Nov 2005 14:22:28 -0800
| Newsgroups | gmane.comp.java.webmacro.user |
|---|---|
| Message-ID | <[email protected]> |
The #setprops is a really nice addition for populating an object or a
collection.
I would use this directive as a very flexible way of specifying the type
of collection you want to use.
nice work, Keats, to the 2.0 release.
Lane
Keats Kirsch wrote:
> 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
> _______________________________________________
> Webmacro-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/webmacro-user
>
--
Lane Sharman
Providing Private and SPAM-Free Email
http://www.opendoors.com
858-755-2868
-------------------------------------------------------
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