passing a list for macro
howlerbr <[email protected]>
| Newsgroups | gmane.comp.web.freemarker.user |
|---|---|
| Message-ID | <[email protected]> |
I have the following macro code:
<#macro tpl_columnHeader columns>
<columnHeader>
<band height="31" isSplitAllowed="true">
<#assign x = 0>
<#list columns as column>
<staticText>
<reportElement mode="Opaque" x="${x}" y="1" width="${column.width}"
height="30" key="staticText-${column_index}" forecolor="#ffffff"
backcolor="#bbbbbb"/>
<box topBorder="None" topBorderColor="#000000" leftBorder="None"
leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000"
bottomBorder="None" bottomBorderColor="#000000"/>
<textElement textAlignment="Center">
</textElement>
<text><![CDATA[${column.display}]]></text>
</staticText>
<#assign x = x + column.width>
</#list>
</band>
</columnHeader>
</#macro>
I'm trying to call it using:
<@tpl_columnHeader columns=columList/>
where columnList is a List of Column object but it's not working. The
columnList is passed from my Java class:
params.put("columnList", columnList);
Is that possible to do what I want? What is the correct syntax???
Thanks,
--
View this message in context: http://www.nabble.com/passing-a-list-for-macro-tp16700781p16700781.html
Sent from the freemarker-user mailing list archive at Nabble.com.
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone