Uploaded image for project: 'RichFaces'
  1. RichFaces
  2. RF-2915

Table sorting bug - it sorts by toString() value, not Integer, Date etc (Comparable implementations in general)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Done
    • Affects Version/s: 3.2.0
    • Fix Version/s: 3.2.1
    • Component/s: None
    • Labels:
      None

      Description

      When using new rich:column's sortBy attribute it improperly treats all data as Strings when performing sorting comparisons. So for example in case of ascendant sorting of two integers, "10000" will improperly appear before "9". Why don't you just use Comparable methods for values which implements this interface?

      Inability of using Dates, Numbers etc. renders sorting functionality quite unusable in real world applications.

      Looks like Scrollable datatable is subject to this issue, too.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                mvitenkov Mikhail Vitenkov
                Reporter:
                krkempa Kris Kempa
              • Votes:
                10 Vote for this issue
                Watchers:
                11 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: