Re: hash & sequence
dirk ooms <[email protected]>
| Newsgroups | gmane.comp.web.freemarker.user |
|---|---|
| Organization | OneSparrow |
| Message-ID | <1234532308.10833.29.camel@venus> |
ok, i figured it out myself. my requirement can be met by using "?values" on a LinkedHashMap in <#list> or <#foreach> dirk On Thu, 2009-02-12 at 21:30 +0100, dirk ooms wrote: > Hello, > > I have data that is stored in a LinkedHashMap, so it has both a hash and > a sequence nature. I would like to address this data in a Freemarker > template in both its natures. In an attempt to achieve this, I created > my own class that extends LinkedHashMap and that provides the sequence > interface methods (get(int) and size()). But when I try to use it in the > <#list> construct Freemarker says: > > Expected collection or sequence. a.b.c evaluated instead to > freemarker.template.SimpleHash > > So it does not recognize it as a sequence. Is there a way I can use my > LinkedHashMap in a <#list>? > > Thanks, > > dirk > > > ------------------------------------------------------------------------------ > _______________________________________________ > FreeMarker-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/freemarker-user ------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H