t:table component? You probably mean a Grid component (http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Grid.html)

And to add a custom row is like this:

<t:grid source="products" row="product" add="totalqty">
    <p:totalqty>
        ${totalqty}
    </p:totalqty>
</t:grid>

In your page class there should be a method called getTotalqty().

....
@Property
private List<Product> products;

@Property
private Product product;

private double totalqty;

public double getTotalqty(){
    return product.price * product.quantity;
}

On 10/27/2012 4:53 PM, membersound wrote:
Hi,

how can I add custom columns to a t:table component? I mean data that is not
a variable in the class that is displayed. Like parameters that are to be
calculated based on data found in the object to display.

Like:
A product has a price and a quantity variable. How could I display an
additional column like price*quantity?

Thanks



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Table-with-custom-columns-tp5717326.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to