ICEfaces
  1. ICEfaces
  2. ICE-1939

rowSelector: toggleOnClick does not work as expected

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.6
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      any

      Description

      the behaviour of the rowSelector component is not yet as expected when setting the new attribute

      - toggleOnClick

      what happens is that the selected row is still highlighted. you don't have any chance to programmatically retrieve the
      selected column of the row you chose. there should be a way to retrieve the selected column out of the underlying
      data model which is not yet possible. also it still doesn't make any difference when selecting i.e. a checkbox or selectOneRadio
      component for changing the selection state. the selected row gets highlighted, no matter which column is selected.
      [ Show » ]
      Michael Thiem [10/Jul/07 05:04 AM] the behaviour of the rowSelector component is not yet as expected when setting the new attribute - toggleOnClick what happens is that the selected row is still highlighted. you don't have any chance to programmatically retrieve the selected column of the row you chose. there should be a way to retrieve the selected column out of the underlying data model which is not yet possible. also it still doesn't make any difference when selecting i.e. a checkbox or selectOneRadio component for changing the selection state. the selected row gets highlighted, no matter which column is selected.

        Issue Links

          Activity

          Michael Thiem created issue -
          Michael Thiem made changes -
          Field Original Value New Value
          Link This issue duplicates ICE-1442 [ ICE-1442 ]
          Michael Thiem made changes -
          Link This issue duplicates ICE-1442 [ ICE-1442 ]
          Hide
          Ken Fyten added a comment -

          I'm not sure what you're getting at. The rowSelector is not specific to a single column, but to the whole row. It operates in two modes:

          1. toggleOnClick=true

          In this scenario the rowSelector will automatically select/deselect any rows that are clicked by the user. There is no accomodation made for cases where input components are displayed in the row, a click on the row selects the row in all cases, regardless of which column is clicked.

          2. toggleOnClick=false

          This setting is intended for cases where you do not want the row selected clicked in any column, such as when you have input components in the row. In this case, it is up to the application to decide what constitutes a row selection action in the user-interface. Common approaches would be to add a checkbox to the left-most column that when selected by the user would also select the row. This way, the application UI can accomodate both input components such as as inputText in the row cells, AND still support user selection of rows.

          If you want to be able to only select rows when a specific column or columns is clicked, etc., you need to use toggleOnClick=false and then implement the application UI to modify the selected rows dataset when an alternative UI event occurs (checkbox selected, button pushed, etc.).

          Show
          Ken Fyten added a comment - I'm not sure what you're getting at. The rowSelector is not specific to a single column, but to the whole row. It operates in two modes: 1. toggleOnClick=true In this scenario the rowSelector will automatically select/deselect any rows that are clicked by the user. There is no accomodation made for cases where input components are displayed in the row, a click on the row selects the row in all cases, regardless of which column is clicked. 2. toggleOnClick=false This setting is intended for cases where you do not want the row selected clicked in any column, such as when you have input components in the row. In this case, it is up to the application to decide what constitutes a row selection action in the user-interface. Common approaches would be to add a checkbox to the left-most column that when selected by the user would also select the row. This way, the application UI can accomodate both input components such as as inputText in the row cells, AND still support user selection of rows. If you want to be able to only select rows when a specific column or columns is clicked, etc., you need to use toggleOnClick=false and then implement the application UI to modify the selected rows dataset when an alternative UI event occurs (checkbox selected, button pushed, etc.).
          Hide
          User aberrant80 added a comment -

          A more useful approach may be to implement toggleOnClick for each column. I did not dig through the code so I would not know of the work involved. My thought is that rather than having to turn off the auto selection for the whole row and then manually enabling it for one column (via toggleOnClick = false), a much more useful approach would be to allow users to turn off row selection from individual columns instead.

          Example: I don't want to use a checkbox for row selection. I want to use the default row selection behavior. However, I have a button on each row that, say, deletes the row, but I don't want the selection to trigger (because I still want to keep the current selection). The only options available to me is to try and bind toggleOnClick to a variable and tweak it programmatically, or I have to add action listeners to the rest of the components on each row. The latter option becomes infeasible when I have a lot of columns. Any other alternatives would be good.

          Show
          User aberrant80 added a comment - A more useful approach may be to implement toggleOnClick for each column. I did not dig through the code so I would not know of the work involved. My thought is that rather than having to turn off the auto selection for the whole row and then manually enabling it for one column (via toggleOnClick = false), a much more useful approach would be to allow users to turn off row selection from individual columns instead. Example: I don't want to use a checkbox for row selection. I want to use the default row selection behavior. However, I have a button on each row that, say, deletes the row, but I don't want the selection to trigger (because I still want to keep the current selection). The only options available to me is to try and bind toggleOnClick to a variable and tweak it programmatically, or I have to add action listeners to the rest of the components on each row. The latter option becomes infeasible when I have a lot of columns. Any other alternatives would be good.
          User aberrant80 made changes -
          Link This issue depends on ICE-1743 [ ICE-1743 ]
          Hide
          Mark Collette added a comment -

          Here's that Jira, for column level selection: ICE-2466

          Show
          Mark Collette added a comment - Here's that Jira, for column level selection: ICE-2466
          Hide
          Mark Collette added a comment -

          But I think that ICE-2471 would be a better approach.

          Show
          Mark Collette added a comment - But I think that ICE-2471 would be a better approach.

            People

            • Assignee:
              Unassigned
              Reporter:
              Michael Thiem
            • Votes:
              3 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: