SortableTableModel does not seem to sort Date objects

This forum is used by users to request and discuss new product features. Please do not use this forum for technical support including bug reports.

Moderator: JIDE Support

Forum rules
Product suggestions only. Please do not use this forum for technical support including bug reports.

SortableTableModel does not seem to sort Date objects

Postby arazvi » Wed Sep 13, 2006 7:04 am

Hi Guys !

I have a SortableTableModel with java.util.Date objects in one of the columns. But when I place the SortableTableModel in a SortableTable
and try to sort the column holding the dates, it sorts them alphabetically
rather than by time e.g.

Friday ....
Monday ....
Wednesday ....

rather than

Monday ....
Wednesday ....
Friday ....

Is this a bug or am I doing something wrong ?

Thanks in advance :)

Asad
arazvi
 
Posts: 27
Joined: Mon Sep 05, 2005 4:07 am

Postby JIDE Support » Wed Sep 13, 2006 7:47 am

If you return Date.class in getColumnClass, it should work. We depend on the right time to look up for the right comparator to do comparision.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am


Return to Product Suggestions

Who is online

Users browsing this forum: No registered users and 112 guests