i've been wondering how i can change the format of the column data given if the data is of type java.util.Date. the t:grid column shows my result as yyyy-mm-dd. how about if i want to show the time as well? is there any waythat i can pass something like SimpleDataFormat to format the date? andthere is a column which is of type double that show my result in 900.0 wherei expect 900.00 with the format of #000.00. can anyone give me some pointer/advise?
<t:parameter name="[propertyName]Cell"> is the answer to your question. It allows you to show whatever you want in a given column.
Example taken from http://tapestry.apache.org/tapestry5/tapestry-core/ref/org/apache/tapestry5/corelib/components/Grid.html:
<t:grid source="users" row="user">
<t:parameter name="lastnamecell">
<t:pagelink page="user/view"
context="user.id">${user.lastname}</t:pagelink>
</t:parameter>
</t:grid>
In your case, you would add a method in your page class that returns the
formatted value and then use it inside <t:parameter>
public String getDate() {
return ... // formats the date
}
<t:grid source="objects" row="object">
<t:parameter name="dateCell">
${date}
</t:parameter>
</t:grid>
Thiago
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
