ICEfaces
  1. ICEfaces
  2. ICE-7007

Support user-specified Multi-Column Sorting for ace:dataTable

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.1-Beta2, 3.0
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      ICEfaces 2.1, ace:dataTable
    • Assignee Priority:
      P2
    • Affects:
      Documentation (User Guide, Ref. Guide, etc.), Sample App./Tutorial

      Description

      Add  optional  support  for  user-specified  multi-column  sorting  of  dataTable  rows. This feature is enabled with the (existing) ace:column "sortBy" attribute. Any visible columns in the dataTable can be included in a multi-column sort as described below:
       
      - To  control  which  columns  are  sorted,  user  will  hold  the  CTRL  (or   Command  on  Mac)  modifier  key  then  click  on  either  the  up  or   down  sort  arrow  in  the  column  header  to  add  the  clicked  column   to  the  current  multi-column  sort.  
        
      - The  clicked  sort  arrow  will  become  highlighted  or  depressed   to  indicate  the  current  sort  direction  (ascending  or   descending).  

      - Columns  are  added  to  the  multi-column  sort  in  the  order  they   are    CTRL/Command-­‐clicked  on.  The  first  column  clicked  will   be  sorted  first,  then  the  second  column  clicked  will  be  sorted   within  the  sort  result  of  the  first  column,  etc.  etc.  

      - Once  more  than  one  column  is  active  in  the  sort,  all  active   columns  (including  the  first  column)  will  have  a  number  (1,  2,   3,  etc.)  representing  their  sort  order  sequence  displayed  in   their  header  region. If only a single column in included in the sort (single-column sort), then no number is displayed in the header for the sort order sequence.   

      - CTRL/Command  clicking  on  the  none-active  sort  arrow  (the   arrow  opposite  the  currently  selected/highlighted/depressed   arrow)  on  a  column  that  is  already  active  in  the  sort  will   change  that  column's  sort  order  (ascending/descending)   without  affecting  its  previously  established  order  in  the  multi-column  sort  sequence.    

      - Without  holding  a  modifier  key  (CTRL/Command),    clicking  on   either  the  up  or  down  sort  arrow  will  result  in  a  single  column  sort   on  the  clicked  column  being  established,  cancelling  any  other   previously  established  single  or  multi-­‐column  sort.  

      - The  sort  will  be  reprocessed  each  time  the  sort  operation  is   modified,  either  by  adding  or  removing  a  column,  or  by  changing   the  sort  order  (ascending/descending)  on  a  column.  

      - Sortable  columns  will  dynamically  display  up/down  sort  arrows  in   the  header  region  of  the  column  when  the  mouse  is  hovered  over   the  column  header  region  (or  the  column  header  has  keyboard   focus).  The  sort  arrow  arrows  will  hide  automatically  when  the   mouse  or  focus  is  outside  the  column  header,  so  long  as  the   column  is  not  part  of  an  active  sort.  Columns  that  are  included  in   an  active  sort  will  have  their  sort  arrows  (and  column  sort  order   sequence  indicator  if  part  of  a  multi-­‐column  sort)  displayed   regardless  of  the  current  mouse/focus  position.    

      - Changing  the  sort  criteria  will  also  be  supported  as  an  atomic   operation  (all  changes  processed  at  once  instead  of  incrementally) in  the  popup  "Table  Config.  Pane"  (see ICE-7005).

      - Sort  criteria  is  submitted  to  server  for  processing  (and  optionally   to  be  persisted  across  user-­‐sessions).

      - The actual sorting is completed on the server, either  via  a default  Java-based  sort handler implementation (included with the component),  or  via  deferral  to  a  data  provider  (db  query-based  implementation).  The intention of the handler-based sort implementation approach is to enable future replacement or refinement of the sort algorithm implementation by application developers, etc.

      - Client-­‐side  sorting  is  NOT  required.

        Issue Links

          Activity

          Hide
          Nils Lundquist added a comment -

          Issue 2 is fixed in r25449.

          Show
          Nils Lundquist added a comment - Issue 2 is fixed in r25449.
          Hide
          Nils Lundquist added a comment -

          Gap between sort arrows increased in r25550

          Show
          Nils Lundquist added a comment - Gap between sort arrows increased in r25550
          Hide
          Nils Lundquist added a comment -

          r25560 - Multisort from Table Config Pane. (Note table config pane currently has a bug where a style tag gets written as a string literal folllowing a config pane submit.)

          Show
          Nils Lundquist added a comment - r25560 - Multisort from Table Config Pane. (Note table config pane currently has a bug where a style tag gets written as a string literal folllowing a config pane submit.)
          Hide
          Ken Fyten added a comment -

          As of svn rvn# 25874 there is an outstanding Known Issue with this feature:

          Column Sorting & Column Config Panel Inconsistency - Presently changes made to the column sorting on the table configuration panel are reflected in the header sort controls, but not vice versa; despite rerendering the config panel during the header-initiated sort request. We speculate this is related to a state saving issue we have noticed elsewhere and are seeeking to rectify.

          Show
          Ken Fyten added a comment - As of svn rvn# 25874 there is an outstanding Known Issue with this feature: Column Sorting & Column Config Panel Inconsistency - Presently changes made to the column sorting on the table configuration panel are reflected in the header sort controls, but not vice versa; despite rerendering the config panel during the header-initiated sort request. We speculate this is related to a state saving issue we have noticed elsewhere and are seeeking to rectify.
          Hide
          Nils Lundquist added a comment -

          Works as expected. Bug free as far as is known.

          Only issue related is that the sort order set on the column headers is not rendered on the controls in the panel.
          ICE-7005 will remain open until that issue is resolved.

          Show
          Nils Lundquist added a comment - Works as expected. Bug free as far as is known. Only issue related is that the sort order set on the column headers is not rendered on the controls in the panel. ICE-7005 will remain open until that issue is resolved.

            People

            • Assignee:
              Nils Lundquist
              Reporter:
              Ken Fyten
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: