ICEfaces
  1. ICEfaces
  2. ICE-4176

RowSelector: always a single row is selected

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.8RC1
    • Fix Version/s: None
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      Icefaces 1.8.rc1

      Description

      Main problem

        We need to ensure that always a single row is selected (NOT 0 and not more than one).
        How is possible to prevent deselecting a row?


      Current, default behaviour of rowSelector:
      - step one, user click on row, row selection is enabled
      - step two, user click the same row, row selection will be disabled

      The problem is how to prevent deselecting of current row in "step two", row should be still selected.
      It looks that any of current tags can't give this behavoiour

      I suggest use one of:
      - change behaviour of RowSelector to "always one selected", on init first row can be selected by default, probably most users do it now
      - use property toggleOnclick, if user select row then toggleOnclick>false and prevent this row from deselection "
      - add new tag like "alwaysSelected=true/false" if true always something is always selected with initial first row selection

        Activity

        Hide
        Lari Tuominen added a comment -

        I'm also looking forward to this feature!

        Show
        Lari Tuominen added a comment - I'm also looking forward to this feature!
        Hide
        Krashan Brahmanjara added a comment -

        BTW workaruond exist. Use rowselector listener similar to

        public void rowSelection(RowSelectorEvent event) {
        if (event.isSelected())

        { // select unselected row if event.getRow() == -1 then select current row }

        else
        select current row

        }

        Show
        Krashan Brahmanjara added a comment - BTW workaruond exist. Use rowselector listener similar to public void rowSelection(RowSelectorEvent event) { if (event.isSelected()) { // select unselected row if event.getRow() == -1 then select current row } else select current row }

          People

          • Assignee:
            Unassigned
            Reporter:
            Krashan Brahmanjara
          • Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: