list binding

The standard way for Tapestry5 you want to bind a collection (list) of values with a parameter, you must declare a method in your component/page class, that returns the colloction value for the parameter like this:

standard tapestry sample

the standard tapestry class looks like this:

...

public List getListValue()
{
    List listValue = new ArrayList(3);
    listValue.add("value 1");
    listValue.add("value 2");
    listValue.add("value 3");

    return listValue;
}

...

the standard tapestry template looks like this:

...

<ul>
    <li t:type="Loop" source="listValue" value="element">
        ${element}
    </li>
</ul>

...

sample with list binding

the advantage of the list binding is: you dont need a class method to fill the value parameter. how easy it is described below:

...

<ul>
    <li t:type="Loop" source="list:\"value 1\", \"value 2\", \"value 3\"" value="element">
        ${element}
    </li>
</ul>

...