ICEfaces
  1. ICEfaces
  2. ICE-9059

DataTable constantRefilter prevents sorting

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: EE-3.2.0.GA
    • Fix Version/s: 3.3
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      n/a
    • Assignee Priority:
      P1
    • Salesforce Case Reference:

      Description

      If you set the constantRefilter attribute to true, apply a filter, and then try to sort another column, the sorting is not applied. The column sort styling is applied, showing that the sorting event has been triggered, but the rows are not sorted.

        Activity

        Hide
        Philip Breau added a comment -

        This change appears to fix the problem:

        Index: C:/work/projects/icefaces-ee-3.2.0.GA/icefaces-ee/icefaces/ace/component/src/org/icefaces/ace/component/datatable/DataTable.java
        ===================================================================
        — C:/work/projects/icefaces-ee-3.2.0.GA/icefaces-ee/icefaces/ace/component/src/org/icefaces/ace/component/datatable/DataTable.java (revision 33876)
        +++ C:/work/projects/icefaces-ee-3.2.0.GA/icefaces-ee/icefaces/ace/component/src/org/icefaces/ace/component/datatable/DataTable.java (working copy)
        @@ -413,8 +413,7 @@
        savedSortState.restoreState(this);
        processSorting();
        }
        -

        • if (isApplyingFilters()) {
          + else if (isApplyingFilters()) {
          if (savedFilterState != null)
          savedFilterState.restoreState(this);
          setFilteredData(processFilters(context));
        Show
        Philip Breau added a comment - This change appears to fix the problem: Index: C:/work/projects/icefaces-ee-3.2.0.GA/icefaces-ee/icefaces/ace/component/src/org/icefaces/ace/component/datatable/DataTable.java =================================================================== — C:/work/projects/icefaces-ee-3.2.0.GA/icefaces-ee/icefaces/ace/component/src/org/icefaces/ace/component/datatable/DataTable.java (revision 33876) +++ C:/work/projects/icefaces-ee-3.2.0.GA/icefaces-ee/icefaces/ace/component/src/org/icefaces/ace/component/datatable/DataTable.java (working copy) @@ -413,8 +413,7 @@ savedSortState.restoreState(this); processSorting(); } - if (isApplyingFilters()) { + else if (isApplyingFilters()) { if (savedFilterState != null) savedFilterState.restoreState(this); setFilteredData(processFilters(context));
        Hide
        Nils Lundquist added a comment - - edited

        Changing the order of these operations fixes this because sorting is applied to the new filtered set rather than the old one.

        Our filter processing should be improved to detect subset filter cases and process the existing subset instead of the full data set, and opt out of processing in cases where filters have not changed. I've noted this as part of other improvements considering for filtering.

        Fixed in trunk and EE 3.2.GA

        Revision #33988
        Committed by nils.lundquist
        4 minutes ago
        ICE-9059 - ace:dataTable changed sorting to occur after filtering so that the sorting is not applied to a filtered set that may be immediately replaced.

        Revision #33989
        Committed by nils.lundquist
        A minute ago
        ICE-9059 - ace:dataTable changed sorting to occur after filtering so that the sorting is not applied to a filtered set that may be immediately replaced.

        Show
        Nils Lundquist added a comment - - edited Changing the order of these operations fixes this because sorting is applied to the new filtered set rather than the old one. Our filter processing should be improved to detect subset filter cases and process the existing subset instead of the full data set, and opt out of processing in cases where filters have not changed. I've noted this as part of other improvements considering for filtering. Fixed in trunk and EE 3.2.GA Revision #33988 Committed by nils.lundquist 4 minutes ago ICE-9059 - ace:dataTable changed sorting to occur after filtering so that the sorting is not applied to a filtered set that may be immediately replaced. Revision #33989 Committed by nils.lundquist A minute ago ICE-9059 - ace:dataTable changed sorting to occur after filtering so that the sorting is not applied to a filtered set that may be immediately replaced.

          People

          • Assignee:
            Nils Lundquist
            Reporter:
            Philip Breau
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: