ICEfaces
  1. ICEfaces
  2. ICE-11091

ace:datatable needs selectall/deselectall javascript functionality for entire table

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.3, 4.0
    • Fix Version/s: EE-4.3.0.GA
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      Linux, Glassfish 4.X, IF 3.3 and 4.0
    • Affects:
      Documentation (User Guide, Ref. Guide, etc.)
    • Community Contribution:
      Yes

      Description

      Currently, there is no selectall/deselectall javascript functionality for the ace:datatable. The only way to kind of do this is to use an ajax listener to modify the stateMap. This is not really acceptable because it forces you to do a submit...whereas simply selecting a single-row does not.

      I personally would like a selectall to ONLY select those columns that are visible (so only on the page shown and only those not filtered), but an option to selectall visible and selectall would be okay as well.

        Activity

        Hide
        William Saxton added a comment - - edited

        selectAllRows() and deselectAllRows() was added in 4.1 but these really should, explicitly, describe what they do which is selectAllRowsOnPage() and deselectAllRowsOnPage().

        These are also only marginally useful because there is no functionality to selectAllRowsInTable() and deselectAllRowsInTable().

        The datatable really needs this functionality because if someone makes a bunch of selections on different pages, there is currently no way of unselecting them without having to go to every page and do it. It would be extremely useful to allow for one button click to handle selecting/deselecting the whole table.

        Show
        William Saxton added a comment - - edited selectAllRows() and deselectAllRows() was added in 4.1 but these really should, explicitly, describe what they do which is selectAllRowsOnPage() and deselectAllRowsOnPage(). These are also only marginally useful because there is no functionality to selectAllRowsInTable() and deselectAllRowsInTable(). The datatable really needs this functionality because if someone makes a bunch of selections on different pages, there is currently no way of unselecting them without having to go to every page and do it. It would be extremely useful to allow for one button click to handle selecting/deselecting the whole table.
        Hide
        Arturo Zambrano added a comment - - edited

        r52775: added selectAllRowsOnPage() alias for selectAllRows() client-side function; added deselectAllRowsOnPage() alias for deselectAllRows() client-side function; added functionality to select and deselect all rows on the table to the Row State demo in the showcase

        It's not possible to add a client-side function to select all rows on the table that aren't being displayed on the page (either because of pagination, filtering or something else), because the row indexing is relative to the number of rows being currently displayed on the page, and this same indexing is used to communicate to the server which rows were selected. The operation of selecting/deselecting all rows in a table, whether they are visible or not, has always been possible via the row state map

        r52776: added selectAllCellsOnPage() alias for selectAllCells() client-side function; added deselectAllCellsOnPage() alias for deselectAllCells() client-side function

        Show
        Arturo Zambrano added a comment - - edited r52775: added selectAllRowsOnPage() alias for selectAllRows() client-side function; added deselectAllRowsOnPage() alias for deselectAllRows() client-side function; added functionality to select and deselect all rows on the table to the Row State demo in the showcase It's not possible to add a client-side function to select all rows on the table that aren't being displayed on the page (either because of pagination, filtering or something else), because the row indexing is relative to the number of rows being currently displayed on the page, and this same indexing is used to communicate to the server which rows were selected. The operation of selecting/deselecting all rows in a table, whether they are visible or not, has always been possible via the row state map r52776: added selectAllCellsOnPage() alias for selectAllCells() client-side function; added deselectAllCellsOnPage() alias for deselectAllCells() client-side function
        Hide
        Arturo Zambrano added a comment -

        r52778: added selectAllRowsInTable() and deselectAllRowsInTable() client-side-triggered utility functions, which perform a request to the server to set all rows to selected or deselected in the row state map

        Show
        Arturo Zambrano added a comment - r52778: added selectAllRowsInTable() and deselectAllRowsInTable() client-side-triggered utility functions, which perform a request to the server to set all rows to selected or deselected in the row state map

          People

          • Assignee:
            Arturo Zambrano
            Reporter:
            William Saxton
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: