Re: [FreeMarker-user] Display String array in FTL
Generates text that depends on changing data (like dynamic HTML).
Brought to you by:
revusky
From: strutstwouser <str...@gm...> - 2009-05-20 16:57:32
|
Yes, the array has data . I printed the same using Struts2 tag , like : <@s.property value="model.borrowers[0].party.legalAddress.addressLine[0]" /> and it gives the value fine. The latest code i was trying was : <#if model.borrowers[0].party.legalAddress.addressLine?exists> <#assign addressLines = model.borrowers[0].party.legalAddress.addressLine> <#list addressLines as addressLine> AddressLine0-> ${addressLine} </#list> </#if> This breaks with the error : freemarker.ext.servlet.ServletContextHashModel cause: freemarker.template.TemplateModelException: ?size is unsupported for: freemarker.ext.beans.SimpleMethodModel >> >> There shouldn't be. Are you 100% sure the array has a first item which >> is not Java null, etc.? > > Oh, and even if you have one of those, it should still throw > freemarker.core.InvalidReferenceException, not NPE. So... maybe the > problem is not exactly there, just around somewhere? > > -- View this message in context: http://www.nabble.com/Display-String-array-in-FTL-tp23632761p23639458.html Sent from the freemarker-user mailing list archive at Nabble.com. |