Array error
Zoran Avtarovski <[email protected]>
| Newsgroups | gmane.comp.web.freemarker.user |
|---|---|
| Message-ID | <C8B45794.4DD1%[email protected]> |
Hi,
I¹m having some issues modifying one of my struts freemarker templates.
Freemarker is throwing an error when I try to access the array.
This is the code that is throwing the error:
<#assign optionCounter = 1 />
<#assign colNumber = 0 />
<#assign colItems = [1,1,1]>
<#if parameters.colItem1??>
<#assign colItems[0] = parameters.colItem1 />
</#if>
<#if parameters.colItem2??>
<#assign colItems[1] = parameters.colItem2 />
</#if>
<#if parameters.colItem3??>
<#assign colItems[2] = parameters.colItem3 />
</#if>
Put simply I set an integer array colItems with default values of 1. Then I
test for tag parameters, if they are present I overwrite the default value.
The error is generated when I use the square bracket notation [ to set the
value of the array items.
Any help would be appreciated.
Z.
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
FreeMarker-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freemarker-user