[stringtemplate-interest] Conditional attribute placement
Terence Parr
parrt at cs.usfca.edu
Thu Jul 31 15:23:26 PDT 2008
On Jul 31, 2008, at 2:05 AM, Mike Evans wrote:
> Hi
>
> I'm trying to conditionally place items of a collection of
> attributes on
> a page, using stringtemplate expression syntax. I need to iterate
> through (for example) a list of 7 attributes, and place 4 on one line,
> then place a line break and place three on the next line. Is there a
> way I can do this using expression syntax, or some other method? I
> see
> there is are ways to differentiate between first and last items in a
> list, but how can I tell if it's the third or fourth item, and
> insert a
> line-break conditional on being the 4th item?
Hi Mike, only hope is the wrap option on expressions and then call
toString(72) or whatever your width is.
Ter
More information about the stringtemplate-interest
mailing list