[stringtemplate-interest] Applying a property to a list

Damien Cassou damien.cassou at gmail.com
Mon Jun 15 04:36:36 PDT 2009


Hi,

I would like StringTemplate to print the property of each element of a
list. Something along:

$struct.fields.name$

where:

- a struct has a getFields() method which returns a list of fields
- a field as a getName() method

It doesn't seem to work, ST is trying to apply getName() to the list
instead of each element (which can be useful sometimes, but not in
this case).

Is there plans to support this?

-- 
Damien Cassou
http://damiencassou.seasidehosting.st

"Lambdas are relegated to relative obscurity until Java makes them
popular by not having them." James Iry


More information about the stringtemplate-interest mailing list