Hi,

Excuse me if this is a silly question but I'm new to Tapestry.

In order to use Loop's value (or index) inside its body, one has to bind it
to some property. Usually this means creating a new property in the page
class.
Here is an example from T5 tutorial.

<t:loop source="1..10" value="index">
   ${index} 
</t:loop>

and in the Java code

private int _index;
public int getIndex()
{
return _index;
}
public void setIndex(int index)
{
_index = index;
}

It seems very clumsy for me to write all this Java code to support a simple
loop.
Can't the Loop component remember its value?

Isn't it possible to use loop's value/index direclty without binding?
Something like this.

<t:loop source="1..10" t:id="aLoop">
   ${aLoop.index} 
</t:loop>


Also, what is the business with those heartbeats in Loop component? I
couldn't understand it from the documentation.


Best regards,
Peter

-- 
View this message in context: 
http://www.nabble.com/Binding-Loop-parameters-tf3433109.html#a9570601
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to