Login  Register

Re: How to retrive values from Map in ftl

Posted by cjhowe on Jul 08, 2006; 11:09am
URL: http://ofbiz.116.s1.nabble.com/How-to-retrive-values-from-Map-in-ftl-tp140572p140575.html

<#assign h = {"name":"mouse", "price":50}>
<#assign keys = h?keys>
<#list keys as key>${key} = ${h[key]}; </#list>

outputs
name = mouse; price = 50;

--- "G.Venkata Phanindra" <[hidden email]> wrote:

> Hi Chris ..
>                 My Map contains values as follows
> and i want to Display them
> in loop
> {2006/5=June 2006, 2006/6=July 2006, 2006/4=May
> 2006, 2006/7=August 2006}
> I want to use both Key anf value in an Anchor tag
> like
> <a href ="/archives/Key">value</a>
> ex :-
> <a href ="/archives/2006/05">May 2006</a>
> how can i display ??
>
> Thanks
> Phani
>
> On 7/8/06, Chris Howe <[hidden email]> wrote:
> >
> > value is retrieved by ${map.key}
> > freemarker.org would be a very beneficial site for
> > this kind of stuff.
> >
> > --- "G.Venkata Phanindra" <[hidden email]>
> wrote:
> >
> > > Hi all,
> > >         I want to retrive Map<Key,value> pair in
> > > ftl, How can i do that.
> > > Phani
> > >
> > > --
> > > G.Venkata Phanindra
> > > Mob:: 9849852989
> > >
> >
> >
>
>
> --
> G.Venkata Phanindra
> Mob:: 9849852989
>