ICEfaces
  1. ICEfaces
  2. ICE-7815

ace:dataTable - deselection of a row server side is not show on the client side

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 3.0, EE-3.0.0.BETA
    • Fix Version/s: 3.1.0.BETA2, 3.1
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      ICEfaces 3.x
    • Assignee Priority:
      P3

      Description

      When deselecting a selected row on the server side, the client side still shows the row as selected. The following code as been tried:

      Code #1:
      stateMap.setAllSelected(false);

      Code #2:
              for (Object rowData : stateMap.getSelected()) {
                  RowState s = stateMap.get(rowData);
                  //s.setSelectable(false);
                  s.setSelected(false);
              }

      The following code does show the rows as deselected, but they can't be selected again:

              for (Object rowData : stateMap.getSelected()) {
                  RowState s = stateMap.get(rowData);
                  s.setSelectable(false);
                  s.setSelected(false);
              }
      1. Case11018Example.zip
        19 kB
        Arran Mccullough
      2. Case11018ExampleWAR.zip
        9.47 MB
        Arran Mccullough

        Activity

        Hide
        Arran Mccullough added a comment -

        Test case that shows issue.

        Steps:

        • Select a row.
        • Click on the "Deselect Row" button.
        • Nothing happens, row remains selected.
        Show
        Arran Mccullough added a comment - Test case that shows issue. Steps: Select a row. Click on the "Deselect Row" button. Nothing happens, row remains selected.
        Hide
        Nils Lundquist added a comment -

        Problem lay with the selection and deselection occuring in the same request rather than the component. The table was using non-ajax selection, and the button to deselect submitted the form and decoded prior to the selection of the 'new' indexes.

        Show
        Nils Lundquist added a comment - Problem lay with the selection and deselection occuring in the same request rather than the component. The table was using non-ajax selection, and the button to deselect submitted the form and decoded prior to the selection of the 'new' indexes.
        Hide
        Nils Lundquist added a comment -

        The second half of the quote above appears to be in regard to a different issue. This issue doesn't concern dom diff.

        However the first part is applicable. Implementing a client side deselect all by emulating clicks on the selected tr elements would be a future-proof way of solving this issue immediately at the application level.

        ice.ace.jq('#dataTableWidgetId tbody:first > tr.ui-selected').trigger('click');

        May very well be all that is required to deselect every row with a faux click.

        Show
        Nils Lundquist added a comment - The second half of the quote above appears to be in regard to a different issue. This issue doesn't concern dom diff. However the first part is applicable. Implementing a client side deselect all by emulating clicks on the selected tr elements would be a future-proof way of solving this issue immediately at the application level. ice.ace.jq('#dataTableWidgetId tbody:first > tr.ui-selected').trigger('click'); May very well be all that is required to deselect every row with a faux click.
        Hide
        Ken Fyten added a comment -

        Assuming the workaround is successful, marking this "Won't Fix" as resolving this from a product perspective would require implementing a complete client-side JavaScript API for the dataTable, which is out of scope for 3.1.

        Show
        Ken Fyten added a comment - Assuming the workaround is successful, marking this "Won't Fix" as resolving this from a product perspective would require implementing a complete client-side JavaScript API for the dataTable, which is out of scope for 3.1.

          People

          • Assignee:
            Nils Lundquist
            Reporter:
            Arran Mccullough
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: