Issue 117265 - sorting grid control content by date values does not work
Summary: sorting grid control content by date values does not work
Status: CLOSED FIXED
Alias: None
Product: App Dev
Classification: Unclassified
Component: api (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: PC Windows NT
: P3 Normal
Target Milestone: ---
Assignee: marc.neumann
QA Contact: issues@api
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-07 17:16 UTC by Frank Schönheit
Modified: 2017-05-20 09:32 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Frank Schönheit 2011-03-07 17:16:40 UTC
The recently introduced feature of sorting grid control values (i.e. the values provided by a css.awt.grid.GridDataModel incarnation, using a css.awt.grid.XSortableGridData adapter) does not work for date, time, and datetime values.

More precise, at the moment a client of this API has to convert all date/time values into strings, using a formatting at its own discretion. Consequently, the sort implementation can sort strings only, by a lexicographic order, which is not what is expected for date/time sorting.

Possible Solution 1:
let the client provide dedicated value comparison

Possible Solution 2:
allow the grid control to display not only the plain type it supports currently, but also more complex types like css.util.Date/Time.

The advantage of the second solution is that now all clients use a common formatting (instead of every client implementing its own magic). Also, the first solution would imply that a client of the grid control needs to maintain both values: the raw data (i.e. the Date/Time value) and the string-formatted data to be put into the GridDataModel.

Thus, we'll strive for the second solution.
Comment 1 Frank Schönheit 2011-03-08 09:07:05 UTC
fixed in CWS gridfixes
Comment 2 Frank Schönheit 2011-04-01 12:29:47 UTC
fs->tk: please verify in CWS gridfixes
Comment 3 marc.neumann 2011-04-05 14:06:53 UTC
verified in cws gridfixes
Comment 4 Oliver-Rainer Wittmann 2012-06-13 12:32:39 UTC
getting rid of value "enhancement" for field "severity".
For enhancement the field "issue type" shall be used.