VS: Loop and iterator

2014-01-29 Thread Ville Virtanen
OK, got it. I thought the source param was collection. You always could (pseudocode) if (values instanceof Collection) { return ((Collection) source).size(); } else { it = source.iterator(); while (it.hasNext()) { it.next(); sum++; } return sum; } Ville -Alkuperäinen viest

VS: Loop and iterator

2014-01-29 Thread Ville Virtanen
Take a look at @BindParameter http://tapestry.apache.org/component-mixins.html --> Look for "Binding the parameter of the core component" You can access all component parameters in the mixin Ville Virtanen -Alkuperäinen viesti- Lähettäjä: Dimitris Zenios [mailto:dimitris.zen...@gmai

VS: Loop and iterator

2014-01-29 Thread Ville Virtanen
Something like: http://tapestry.apache.org/component-parameters.html#ComponentParameters-Ren derVariables:Bindings ? Ville -Alkuperäinen viesti- Lähettäjä: Lenny Primak [mailto:lpri...@hope.nyc.ny.us] Lähetetty: 29. tammikuuta 2014 21:07 Vastaanottaja: Tapestry development Aihe: Re: Loo

VS: Loop and iterator

2014-01-29 Thread Ville Virtanen
Hi, you can pass mixins parameters, so you could pass the original collection you're iterating over with the loop to the mixin also, and compare if the collection.size() == index http://tapestry.apache.org/component-mixins.html Look for "Mixin Parameters". Ville -Alkuperäinen viesti-