You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Antonio Gallardo <ag...@agsoftware.dnsalias.com> on 2003/12/07 00:58:38 UTC

[JXTemplate] row counter (was Re: JXTemplate problem)

Hi Christopher:

Thanks for the tip. I finally get the row counter works:

<jx:set var="counter" value="#{1}"/>
<jx:forEach ....>
  <td><jx:formatNumber value="#{$counter}"/></td>
  <jx:set var="counter" value="#{1 + $counter}"/>
</jx:forEach ....>

This JXGenerator really rocks! :-DDD

Best Regards,

Antonio Gallardo

Christopher Oliver dijo:
> It only fails with literal values (i.e. outside of #{} and ${}). I've
> just checked in a fix. Until you get that, as a workaround, you can do
> this:
>
> <jx:set var="label" value="#{1}">
>
> Note also that the way you increment the counter below won't work.
> Probably what you want is this:
>
> <jx:set var="label" value="#{1 + $label}"/>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org