Re: Invalid Reference Exception while accessing nested map in freemarker

Daniel Dekany <[email protected]> Sat, 16 Mar 2013 11:22:56 +0100
Newsgroups gmane.comp.web.freemarker.user
Message-ID <[email protected]>
Works for me with both DefaultObjectWrapper and BeansWrapper, so I
guess somelist contains some bad keys. But see the same answer on SO
with test code:
http://stackoverflow.com/questions/15440026/invalid-reference-exception-while-accessing-nested-map-in-freemarker/15448101#15448101


Friday, March 15, 2013, 7:57:02 PM, Sushrut Bidwai wrote:

> Hi,
>
> I have nested map.
>
> Map<String, Map<String, Long>> domains;
>
> When I access it in following manner I get InvalidReferenceException
>
> <#list somelist as item>
>   <#list domains[item]?keys as key>
>     ${key}
>   </#list>
> </#list>
>
> Expression domains[item] is undefined on line...
>
> I tried using BeansWrapper as well as DefaultObjectWrapper. Also I
> have checked contents on the map and none of the values are null.
>
> Link to the same question on SO.
>
>
> --
> Best Regards,
> Sushrut
> http://simplycious.com 

-- 
Best regards,
 Daniel Dekany


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar