Looping over a List
jpcook <[email protected]>
| Newsgroups | gmane.comp.web.freemarker.user |
|---|---|
| Message-ID | <[email protected]> |
Hello,
Is it possible to use the item_index value to retrieve a specific value from
a list. eg)
<#list resource.fixtures as fixtures>
<#if fixtures[fixtures_index+1].competition.name.abbrTextLong !=
fixtures[fixtures_index].competition.name.abbrTextLong >
<div class="compName">${fixtures.competition.name.abbrTextLong}</div>
</#if>
</#list>
The above does not work, fixtures is a standard java ArrayList.
Basically what I am trying to do is compare some properties on the next
value in the list with the current value and if they aren't the same i wan't
to display a header.
It seems like #list is more like a for each loop and there doesn't seem an
obvious way to do this?
Thanks
Jonathan
--
View this message in context: http://www.nabble.com/Looping-over-a-List-tp24037452p24037452.html
Sent from the freemarker-user mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects