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
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
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
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-