Re: Display list item in freemarker page

Barrie Selack <[email protected]> Thu, 9 May 2013 18:37:50 -0400
Newsgroups gmane.comp.web.freemarker.user
Message-ID <[email protected]>
http://freemarker.sourceforge.net/docs/ref_builtins_date.html

Here are possible date formatting options

Where is activeCounty.label defined> What does your Country bean look like?

Barrie

On May 9, 2013, at 3:07 PM, anjibman <[email protected]> wrote:

> Hi I have a DTO  as follow
> class MyDTO {
> 	
> 	String name
> 	java.Util.Date acctCreatedDate
> 	List<County> activeCountyList
> }
> 
> In ftl I have
> 
> <#if name??> ${name} <#else> Test </#if> 
> <#if acctCreatedDate??> ${acctCreatedDate} </#if>
> <ul>
> <#list activeCountyList as activeCounty>
> <li>${activeCounty.label}</li>
> </#list>
> </ul>
> 
> "name" is displayed OK.
> "acctCreatedDate" is displayed as  "Fri Apr 26 15:37:29 EDT 2013". How can I
> display as "26/04/2013"?
> For list I am getting error
> Expected collection or sequence. achievements evaluated instead to
> freemarker.ext.beans.StringModel
> 
> Any help is appreciated.
> 
> Thanks
> 
> 
> 
> 
> --
> View this message in context: http://freemarker.624813.n4.nabble.com/Display-list-item-in-freemarker-page-tp4654544.html
> Sent from the freemarker-user mailing list archive at Nabble.com.
> 
> ------------------------------------------------------------------------------
> Learn Graph Databases - Download FREE O'Reilly Book
> "Graph Databases" is the definitive new guide to graph databases and 
> their applications. This 200-page book is written by three acclaimed 
> leaders in the field. The early access version is available now. 
> Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
> _______________________________________________
> FreeMarker-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/freemarker-user


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and 
their applications. This 200-page book is written by three acclaimed 
leaders in the field. The early access version is available now. 
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may