ICEfaces
  1. ICEfaces
  2. ICE-11091

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

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • 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

        William Saxton created issue -
        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.
        Arturo Zambrano made changes -
        Field Original Value New Value
        Fix Version/s EE-4.3.0.GA [ 13103 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #52775 Tue Nov 13 14:03:40 MST 2018 art.zambrano ICE-11091 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
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/samples/showcase/showcase/src/main/java/org/icefaces/samples/showcase/example/ace/dataTable/DataTableRowState.java
        Commit graph MODIFY /icefaces4/trunk/icefaces/samples/showcase/showcase/src/main/webapp/resources/examples/ace/dataTable/dataTableRowState.xhtml
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/resources/icefaces.ace/datatable/datatable.js
        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
        Arturo Zambrano made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 4.1 [ 11375 ]
        Resolution Fixed [ 1 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #52776 Tue Nov 13 14:19:14 MST 2018 art.zambrano ICE-11091 added selectAllCellsOnPage() alias for selectAllCells() client-side function; added deselectAllCellsOnPage() alias for deselectAllCells() client-side function
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/resources/icefaces.ace/datatable/datatable.js
        Arturo Zambrano made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #52778 Thu Nov 15 12:31:41 MST 2018 art.zambrano ICE-11091 added selectAllRowsInTable() and deselectAllRowsInTable() client-side-triggered utility functions
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/datatable/DataTable.java
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/datatable/DataTableDecoder.java
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/resources/icefaces.ace/datatable/datatable.js
        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
        Arturo Zambrano made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: