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

        William Saxton created issue -
        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.
        William Saxton made changes -
        Field Original Value New Value
        Attachment icefaces-hacks.js [ 19886 ]
        Ken Fyten made changes -
        Assignee Arturo Zambrano [ artzambrano ]
        Fix Version/s 4.1 [ 11375 ]
        Affects Documentation (User Guide, Ref. Guide, etc.) [ 10003 ]
        Ken Fyten made changes -
        Community Contribution Yes [ 10020 ]
        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.
        Arturo Zambrano made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        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...)
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #46319 Thu Dec 03 09:50:29 MST 2015 carmen.cristurean ICE-10874 add showcase dataTable > Selection Client-Side demo for ICE-10717.
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/samples/showcase/showcase/src/main/java/org/icefaces/samples/showcase/view/menu/data/CentralDataList.java
        Commit graph ADD /icefaces4/trunk/icefaces/samples/showcase/showcase/src/main/java/org/icefaces/samples/showcase/example/ace/dataTable/DataTableSelectorClient.java
        Commit graph MODIFY /icefaces4/trunk/icefaces/samples/showcase/showcase/src/main/resources/org/icefaces/samples/showcase/view/resources/messages.properties
        Commit graph ADD /icefaces4/trunk/icefaces/samples/showcase/showcase/src/main/webapp/resources/examples/ace/dataTable/dataTableSelectorClient.xhtml
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #46324 Thu Dec 03 15:57:22 MST 2015 carmen.cristurean ICE-10874 undo add showcase dataTable > Selection Client-Side demo for ICE-10717, add functionality to existing dataTable > Selection demo.
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/samples/showcase/showcase/src/main/java/org/icefaces/samples/showcase/view/menu/data/CentralDataList.java
        Commit graph MODIFY /icefaces4/trunk/icefaces/samples/showcase/showcase/src/main/resources/org/icefaces/samples/showcase/view/resources/messages.properties
        Commit graph MODIFY /icefaces4/trunk/icefaces/samples/showcase/showcase/src/main/webapp/resources/examples/ace/dataTable/dataTableSelector.xhtml
        Commit graph DEL /icefaces4/trunk/icefaces/samples/showcase/showcase/src/main/webapp/resources/examples/ace/dataTable/dataTableSelectorClient.xhtml
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #46325 Thu Dec 03 16:02:28 MST 2015 carmen.cristurean ICE-10874 undo add showcase dataTable > Selection Client-Side demo for ICE-10717 (delete bean).
        Files Changed
        Commit graph DEL /icefaces4/trunk/icefaces/samples/showcase/showcase/src/main/java/org/icefaces/samples/showcase/example/ace/dataTable/DataTableSelectorClient.java
        Ken Fyten made changes -
        Issue Type New Feature [ 2 ] Improvement [ 4 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: