You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@freemarker.apache.org by "sophie (Jira)" <ji...@apache.org> on 2020/01/02 12:36:00 UTC

[jira] [Commented] (FREEMARKER-87) <#list map as key,value> should always iterating on map entries

    [ https://issues.apache.org/jira/browse/FREEMARKER-87?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17006773#comment-17006773 ] 

sophie commented on FREEMARKER-87:
----------------------------------

So what`s the long term fix? Has FriendlyMapModel become part of freemaker?

> <#list map as key,value> should always iterating on map entries
> ---------------------------------------------------------------
>
>                 Key: FREEMARKER-87
>                 URL: https://issues.apache.org/jira/browse/FREEMARKER-87
>             Project: Apache Freemarker
>          Issue Type: Bug
>          Components: engine
>    Affects Versions: 2.3.27-incubating
>            Reporter: Yanming Zhou
>            Priority: Major
>         Attachments: MapIteratingTest.java
>
>
> I'm using struts2, use FriendlyMapModel instead of default MapModel, It works fine except map have key such as "size", the value will be unexpected SimpleMethodModel, I think freemarker should always use entry value for directive <#list map as key,value>, not matter how MapModel works, MapModel should only affect map.size and map.get('size').
> I attached a test case.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)