ICEfaces
  1. ICEfaces
  2. ICE-10717

ace:datatable needs selectall/deselectall javascript functionality

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.3, 4.0
    • Fix Version/s: 4.1
    • 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

        The attached file, icefaces-hacks.js, is my current workaround for this functionality.

        Show
        William Saxton added a comment - - edited The attached file, icefaces-hacks.js, is my current workaround for this functionality.
        Hide
        Arturo Zambrano added a comment -

        r45764: added selectAllRows, deselectAllRows, selectAllCells and deselectAllCells client-side utility functions for ace:dataTable

        Thank you for your contribution William. I modified some functions that were causing some errors with the current code, updated the table body selector, and added checks to only apply these functions in multiple selection mode, since the server expects either single or multiple selection requests. I also created versions for selecting/deselecting all cells.

        Show
        Arturo Zambrano added a comment - r45764: added selectAllRows, deselectAllRows, selectAllCells and deselectAllCells client-side utility functions for ace:dataTable Thank you for your contribution William. I modified some functions that were causing some errors with the current code, updated the table body selector, and added checks to only apply these functions in multiple selection mode, since the server expects either single or multiple selection requests. I also created versions for selecting/deselecting all cells.
        Hide
        Arturo Zambrano added a comment -

        Testing notes: these utility functions can be used in the following way:
        <button onclick="ice.ace.instance('form:selectionTable').selectAllRows();return false;">Select All</button>
        <button onclick="ice.ace.instance('form:selectionTable').deselectAllRows();return false;">Deselect All</button>
        <button onclick="ice.ace.instance('form:selectionTable').selectAllCells();return false;">Select All Cells</button>
        <button onclick="ice.ace.instance('form:selectionTable').deselectAllCells();return false;">Deselect All Cells</button>

        Show
        Arturo Zambrano added a comment - Testing notes: these utility functions can be used in the following way: <button onclick="ice.ace.instance('form:selectionTable').selectAllRows();return false;">Select All</button> <button onclick="ice.ace.instance('form:selectionTable').deselectAllRows();return false;">Deselect All</button> <button onclick="ice.ace.instance('form:selectionTable').selectAllCells();return false;">Select All Cells</button> <button onclick="ice.ace.instance('form:selectionTable').deselectAllCells();return false;">Deselect All Cells</button>
        Hide
        Liana Munroe added a comment -

        Verified ICEfaces 4 trunk r45771, Tomcat 7, IE 11, 10, 9, 8, FF 34, Chrome 43.
        New QA test page /ICE-10717.jsf added to:
        http://dev.icesoft.com/svn/repo/qa/trunk/Regression-Icefaces4/Sparkle/Nightly/dataTable

        Show
        Liana Munroe added a comment - Verified ICEfaces 4 trunk r45771, Tomcat 7, IE 11, 10, 9, 8, FF 34, Chrome 43. New QA test page / ICE-10717 .jsf added to: http://dev.icesoft.com/svn/repo/qa/trunk/Regression-Icefaces4/Sparkle/Nightly/dataTable
        Hide
        William Saxton added a comment -

        Great! (Now I just need to upgrade to 4.X to actually use it...)

        Show
        William Saxton added a comment - Great! (Now I just need to upgrade to 4.X to actually use it...)

          People

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

            Dates

            • Created:
              Updated:
              Resolved: