Re: Invalid Reference Exception while accessing nested map in freemarker

Sushrut Bidwai <[email protected]> Sat, 16 Mar 2013 00:46:15 +0530
Newsgroups gmane.comp.web.freemarker.user
Message-ID <CAPwE3BAb+WqCqJ4L-=yjHw9C0ZTjWvOZ04VyLxKJWhX12+Q1CA@mail.gmail.com>
Hi Dennis,

Map root = new HashMap();
root.put("domains", domains);

On Sat, Mar 16, 2013 at 12:41 AM, Denis Bredelet <[email protected]> wrote:

> 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<http://stackoverflow.com/questions/15440026/invalid-reference-exception-while-accessing-nested-map-in-freemarker>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
>
>


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