From: Ivan [mailto:[EMAIL PROTECTED]]
> Christoph's note of Jan 24 says that I can use an array defined in the
> template, but I haven't been successful.
[snip]
Here is what I was able to do just now :
My template :
#set($arr = ["a","b","c"])
#set($foo = 1)
$arr.get(1)
$arr.get($foo)
$arr.get($one)
$arr.get($provider.getInt() )
$arr.get($provider.getInteger() )
$arr.get($provider.int )
$arr.get($provider.integer)
Where in my test program :
context.put("one", new Integer(1) );
and in the test provider (see org.apache.velocity.test.misc and environs...)
public int getInt()
{
return 1;
}
public Integer getInteger()
{
return new Integer(1);
}
my output :
b
b
b
b
b
b
b
So things seem fine. This was done with the 20010213 nightly snapshot under
WinNT w/ jdk1.3
Take a look and see what the return type of '$query.cond' is....
geir