Re: Invalid Reference Exception while accessing nested map in freemarker

Denis Bredelet <[email protected]> Fri, 15 Mar 2013 19:11:04 +0000
Newsgroups gmane.comp.web.freemarker.user
Message-ID <[email protected]>
Hi Sushrut,
> 
> I have nested map.
> 
> Map<String, Map<String, Long>> domains;
> 
How did you add it to the data root?


> 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
> ------------------------------------------------------------------------------
> 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
> _______________________________________________
> FreeMarker-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/freemarker-user

------------------------------------------------------------------------------
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

_______________________________________________
FreeMarker-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freemarker-user