ICEfaces
  1. ICEfaces
  2. ICE-9514

ace:column - filterBy does not filter for time values

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: EE-3.3.0.GA
    • Fix Version/s: None
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      All
    • Salesforce Case Reference:
    • Workaround Exists:
      Yes
    • Workaround Description:
      Hide
      This can be worked around by altering the toString representation of the Date object in the column to match the expected output format. Use a wrapper class similar to:

      class DateWrapper extends Date {
      Date d;
      public DateWrapper(Date d) { this.d = d; }
      ...
      public toString() { return getMyDateConverter().toString(d); }
      }

      Where getMyDateConverter().toString(Date) is implemented to produce a string formatted identically to the output in your column.
      Show
      This can be worked around by altering the toString representation of the Date object in the column to match the expected output format. Use a wrapper class similar to: class DateWrapper extends Date { Date d; public DateWrapper(Date d) { this.d = d; } ... public toString() { return getMyDateConverter().toString(d); } } Where getMyDateConverter().toString(Date) is implemented to produce a string formatted identically to the output in your column.

      Description

      A column in an ace:dataTable displays dates in the "dd.MM.yyyy HH:mm:ss" format. When attempting to filter on the time values, no results are returned. When filtering for the date, month, and year values this works without any issues.

        Issue Links

          Activity

          Hide
          Nils Lundquist added a comment -

          This issue will be tackled when ready to overhaul filtering in general.

          In the meantime this can be worked around by altering the toString representation of the Date object in the column to match the expected output format. Use a wrapper class similar to:

          class DateWrapper extends Date {
          Date d;
          public DateWrapper(Date d)

          { this.d = d; }

          ...

          public toString()

          { return getMyDateConverter().toString(d); }

          }

          Where getMyDateConverter().toString(Date) is implemented to produce a string formatted identically to the output in your column.

          Show
          Nils Lundquist added a comment - This issue will be tackled when ready to overhaul filtering in general. In the meantime this can be worked around by altering the toString representation of the Date object in the column to match the expected output format. Use a wrapper class similar to: class DateWrapper extends Date { Date d; public DateWrapper(Date d) { this.d = d; } ... public toString() { return getMyDateConverter().toString(d); } } Where getMyDateConverter().toString(Date) is implemented to produce a string formatted identically to the output in your column.
          Hide
          Arran Mccullough added a comment -

          Attached test case that reproduced issue.

          Note: the icefaces.jar, icefaces-ace.jar and icefaces-compat.jar need to be added to the war to run.

          Steps:

          • Load welcomeICEfaces.jsf
          • In the second date column, enter in a number that is used for the time. No results are returned.
          Show
          Arran Mccullough added a comment - Attached test case that reproduced issue. Note: the icefaces.jar, icefaces-ace.jar and icefaces-compat.jar need to be added to the war to run. Steps: Load welcomeICEfaces.jsf In the second date column, enter in a number that is used for the time. No results are returned.

            People

            • Assignee:
              Unassigned
              Reporter:
              Arran Mccullough
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: