[stringtemplate-interest] quick question

Terence Parr parrt at cs.usfca.edu
Wed May 10 13:59:20 PDT 2006


On May 10, 2006, at 2:08 PM, Micheal J wrote:

> $["1", "2", "3"]:{index|
>     <tr><td>$index$</td></tr>
> }$
>
> Just off the top of my head and may not work. ;-)

Ah, you need something fixed.  Ok, well, the model says what to  
display and the view says how.  So, you should not be specifying  
thinks like "10 rows" in the view unless it's a paging thing.  That I  
handled by only sending a page's worth of data to the view, but I can  
see how truncating could be useful and not break rules:

<names:{n, i<10 | ...}>

we start to get dangerously close to generic expressions though ;)

Ter



More information about the stringtemplate-interest mailing list