Problem solved since I always know the Key values I read them now directly.

I loop through the list and then read the hashmap.
List<HashMap<String, String>>
${ognl:post.get('title')}

Yours,
Kasper

> Hi all,
>
> I have a List<List<String>> which can be looped through by the Loop
> component. This works fine, but I also need Key values. As far as I know,
> a list only has integer key values where I do need Strings. For this I
> want to use a List<HashMap<String, String>>. But it seems to be impossible
> to loop through a HashMap. (it may also be HashMap<String, HashMap<String,
> String>>)
>
> Currently I am doing this:
> <t:loop source="posts" value="var:post">
>       <ul>
>               <t:loop source="var:post" value="var:postDetail">
>                       <li>${var:postDetail}</li>
>               </t:loop>
>       </ul>
> </t:loop>
>
> When I try to do the same with a HashMap, it doesn't work.
>
> The final layout must be:
> <li>key: value</li>
> As in: <li>Author: Someone</li>
>
> Does someone know how to do this inside the *.tml file?
>
> Thanks,
> Yours,
> Kasper
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to