I use two solutions for this (depends on the situatioin)
1. Define your own Date class (e.g. class MyDate extends Date), write a 
Converter for MyDate, add a method getMyDate to your data class and write
     columns.add( new PropertyColumn( new Model( "Call Received" ),
     "callReceived",      "getMyDate" ) );
2. Override the populateItem method of the PropertyColumn class e.g. place a 
simple Label with the String representatin of your Date into the table cell

Maybe there is a better way to do this and I can learn from the communito too.

Stefan

-----Ursprüngliche Nachricht-----
Von: Karen Schaper [mailto:[EMAIL PROTECTED] 
Gesendet: Dienstag, 18. Dezember 2007 00:40
An: [email protected]
Betreff: Format date column in DefaultDataTable

Hi,

Another newbie question from me.

I have a table that has a date column in it and I am trying to format the date 
to also display the time.  It seems to just default to showing ie.
11/14/07.

I can't see how to add any of the date converter or formatting of dates to the 
table I am using below.  The callReceived is a date object.


List columns = new ArrayList();

columns.add( new PropertyColumn( new Model( "Call Received" ),
"callReceived",      "callReceived" ) );
.
.
.
add( new DefaultDataTable( "troubleCallTable", columns, _dataProvider,
25 ) );

Thanks for all your previous replies as well.. they have been very helpful.

Karen.


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