{"action":"created","issue":{"url":"https://api.github.com/repos/ninjaframework/ninja/issues/437","labels_url":"https://api.github.com/repos/ninjaframework/ninja/issues/437/labels{/name}","comments_url":"https://api.github.com/repos/ninjaframework/ninja/issues/437/comments","events_url":"https://api.github.com/repos/ninjaframework/ninja/issues/437/events","html_url":"https://github.com/ninjaframework/ninja/issues/437","id":123599607,"number":437,"title":"Listing items using FreeMarker","user":{"login":"MrDunne","id":6549428,"avatar_url":"https://avatars.githubusercontent.com/u/6549428?v=3","gravatar_id":"","url":"https://api.github.com/users/MrDunne","html_url":"https://github.com/MrDunne","followers_url":"https://api.github.com/users/MrDunne/followers","following_url":"https://api.github.com/users/MrDunne/following{/other_user}","gists_url":"https://api.github.com/users/MrDunne/gists{/gist_id}","starred_url":"https://api.github.com/users/MrDunne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MrDunne/subscriptions","organizations_url":"https://api.github.com/users/MrDunne/orgs","repos_url":"https://api.github.com/users/MrDunne/repos","events_url":"https://api.github.com/users/MrDunne/events{/privacy}","received_events_url":"https://api.github.com/users/MrDunne/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-23T04:14:00Z","updated_at":"2015-12-23T11:30:46Z","closed_at":"2015-12-23T11:30:46Z","body":"From what I have seen outside of Ninja, the system for rendering a list is as follows:\r\n\r\nJava:\r\n\r\n```\r\n        Balance balance = new Balance();\r\n        balance.amount = 10L;\r\n        balance.name = \"TEST\";\r\n\r\n        List<Balance> balances = Arrays.asList(balance);\r\n\r\n\r\n        Result result = Results.html().render(\"balances\", balance);\r\n\r\n```\r\n\r\nFreeMarker:\r\n\r\n```\r\n                    <#list balances as i>\r\n                        <div class=\"col s1\">\r\n                            <div class=\"bsquare\">\r\n                                <div class=\"head\">\r\n                                    ${i.name}\r\n                                </div>\r\n                                <div class=\"body\">\r\n                                    ${i.amount}\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                    </#list>\r\n```\r\n\r\nHowever, for some reason in Ninja this creates an error (when rendering, not on compile) of:\r\n\r\nFor \"#list\" list source: Expected a sequence or collection, but this has evaluated to an extended_hash+string (models.Balance wrapped into f.e.b.StringModel):\r\n==> balances  [in template \"views/ApplicationController/account.ftl.html\" at line 13, column 28]\r\n\r\nWith line 28 being 'list balances as i'\r\n\r\nWhat would be the correct way to do this in Ninja?"},"comment":{"url":"https://api.github.com/repos/ninjaframework/ninja/issues/comments/166868191","html_url":"https://github.com/ninjaframework/ninja/issues/437#issuecomment-166868191","issue_url":"https://api.github.com/repos/ninjaframework/ninja/issues/437","id":166868191,"user":{"login":"MrDunne","id":6549428,"avatar_url":"https://avatars.githubusercontent.com/u/6549428?v=3","gravatar_id":"","url":"https://api.github.com/users/MrDunne","html_url":"https://github.com/MrDunne","followers_url":"https://api.github.com/users/MrDunne/followers","following_url":"https://api.github.com/users/MrDunne/following{/other_user}","gists_url":"https://api.github.com/users/MrDunne/gists{/gist_id}","starred_url":"https://api.github.com/users/MrDunne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MrDunne/subscriptions","organizations_url":"https://api.github.com/users/MrDunne/orgs","repos_url":"https://api.github.com/users/MrDunne/repos","events_url":"https://api.github.com/users/MrDunne/events{/privacy}","received_events_url":"https://api.github.com/users/MrDunne/received_events","type":"User","site_admin":false},"created_at":"2015-12-23T11:30:46Z","updated_at":"2015-12-23T11:30:46Z","body":"I've removed coffee from my diet recently, thanks for the help"}}