jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • DisplayTag
  • DISPL-18

Setting own comparator for column sorting

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.0 RC1
  • Fix Version/s: 1.1
  • Component/s: Paging/Sorting
  • Labels:
    None

Description

====
imported from sf tracker
id 1020990
submitted by Diego Werba Montiel - dwerbam
http://sourceforge.net/tracker/index.php?func=detail&group_id=73068&atid=536613&aid=1020990
====

I made some changes to rc1 to solve the problem for
sorting (how to compare row values).

Adding a "comparator" attribute to display:column you
can specify the full classname that will solve how to
order the rows.

I don't know if it is the "best" way to resolve the
problem but it works.

You can check the solution in the attached patch file or
even rewrite rc1 sources with it and execute maven.

Seeya
  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. File
    cvspatch
    19/Nov/04 4:48 PM
    12 kB
    fabrizio giustina
  2. File
    displaytag-1.0-rc1-patch-comparator.tgz
    25/Sep/04 5:15 AM
    19 kB
    fabrizio giustina

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
fabrizio giustina added a comment - 25/Sep/04 5:15 AM
patch
Show
fabrizio giustina added a comment - 25/Sep/04 5:15 AM patch
Hide
Permalink
fabrizio giustina added a comment - 19/Nov/04 4:48 PM
addictional patch from http://sourceforge.net/tracker/index.php?func=detail&aid=973874&group_id=73068&atid=536616

===

Dejan Krsmanovic - dejank

It would be nice if column tag could contain attribute
for specifying Comparator class that should be used for
sorting. That way, comparing String could be case
insensitive and sorting Dates would be easer and
sorting could be possible for non-English languages...
Show
fabrizio giustina added a comment - 19/Nov/04 4:48 PM addictional patch from http://sourceforge.net/tracker/index.php?func=detail&aid=973874&group_id=73068&atid=536616 === Dejan Krsmanovic - dejank It would be nice if column tag could contain attribute for specifying Comparator class that should be used for sorting. That way, comparing String could be case insensitive and sorting Dates would be easer and sorting could be possible for non-English languages...
Hide
Permalink
andy pruitt added a comment - 07/Mar/05 12:53 PM
Fixed for 1.1 - added comparator attribute to column
Show
andy pruitt added a comment - 07/Mar/05 12:53 PM Fixed for 1.1 - added comparator attribute to column

People

  • Reporter:
    fabrizio giustina
Vote (3)
Watch (1)

Dates

  • Created:
    25/Sep/04 5:15 AM
    Updated:
    07/Mar/05 12:54 PM
    Resolved:
    07/Mar/05 12:54 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.