[stringtemplate-interest] quick question
David Moshal
dmoshal at gmail.com
Wed May 10 14:18:22 PDT 2006
thanks Ter, actually, it's not quite fixed (though in the example it is).
What I really need to do is for the model to tell the view how many rows to
create, ie:
<% for (int i=0; i< rowCount: i++) { %>
<tr> <td> <%=i%> </td></tr>
<% } %>
where the model passes in "rowCount".
Regarding the "|" notation, I must confess that the documentation does leave
me confused
- perhaps I just need to experiment a bit.
Thanks again,
Dave
On 5/10/06, Terence Parr <parrt at cs.usfca.edu> wrote:
>
>
> 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
>
> _______________________________________________
> stringtemplate-interest mailing list
> stringtemplate-interest at antlr.org
> http://www.antlr.org:8080/mailman/listinfo/stringtemplate-interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org:8080/pipermail/stringtemplate-interest/attachments/20060510/61b4e3de/attachment.html
More information about the stringtemplate-interest
mailing list