Overview | Library | Tag | Help
| FRAMES NO FRAMES

## ICE Components
Tag rowSelector

The Row Selector tag enables single and multiple row selection for DataTable. To add the row selection to the dataTable, the rowSelector component can be added to any column of the dataTable(e.g.)

<ice:dataTable..>
<ice:column>
<ice:rowSelector .../>
<f:facet name="header">
<ice:outputText ..../>
</f:facet>
<ice:outputText ...../>
</ice:column>

Note: there should be only one rowSelector component inside a dataTable.

The row selection will fire a RowSelectorEvent which can be caught by the selectionListener on this component.

The selection is based on the following two attributes:

- multiple
- enhancedMultiple

By default the component runs in single selection mode. In which selecting a row deselects the previously selected row. Setting "multiple" to true, puts the component in multiple selection mode, which allows you to select multiple rows but you can not use "ctrl" or "shift" keys for selection.
Setting the "enhancedMultiple" to true, allows single or muliple selection using the shift or ctrl keys combination. For more detail please see the attribute specific description.

Note: It is a good practice to use the immediate parameter of the rowSelector. If set to true, it will work with the results of the selection in APPLY_REQUEST_VALUE phase, before validation occurs. If set to false it will defer event processing until INVOKE_APPLICATION phase, after validation. If validation fails, selection event will not fire with immediate=false

Tag Information
Tag Class | com.icesoft.faces.component.RowSelectorTag
TagExtraInfo Class | None
Body Content | JSP
Display Name | None

Attributes
Name | Required | Request-time | Type | Description
binding | false | false | `java.lang.String` | The value binding expression linking this component to a property in a backing bean
clickAction | false | false | `java.lang.String` | Action method to call when a row is clicked or double-clicked.
clickListener | false | false | `java.lang.String` | Listener method to call with a ClickActionEvent when a row is clicked or double-clicked. This listener is fired independently of selectionListener. The ClickActionEvent object contains a reference to a RowSelectorEvent if the click or double click resulted in (de)selection of the row, otherwise it will be null. ClickActionEvent.isDblClick() determines whether the click event was a single click or a double click.
clickedRow | false | false | `java.lang.String` | The table row that was last clicked. Setting this to some value will not effect row selection.
dblClickDelay | false | false | `java.lang.String` | The delay or timeout in milliseconds to wait for a second click (after a first click has been made on a row) to notify the server whether the ClickActionEvent was a single click or a double click. This attribute only applies when clickListener and/or clickAction are specified. Valid values are 0 to 1000. Default is 200.
enhancedMultiple | false | false | `java.lang.String` | When enhancedMultiple is true, it allows following selection behaviour: "Click" selects clicked row and deselects rest "Click + Ctrl" flip the selection of clicked row and keeps previous selection intact "Click + Shift" selects all rows from last clicked row to newly clicked row, and deselect rest "Click + Shift + Ctrl" selects all rows from last clicked row to newly clicked row and keeps previous selection intact
id | false | false | `java.lang.String` | The component identifier for this component. This value must be unique within the closest parent component that is a naming container.
immediate | false | false | `java.lang.String` | If true, the selectionListener and selectionAction will be executed immediately, during Apply Request Values phase of the request processing lifecycle, and if false, during the Invoke Application phase. The default value is true, for backwards compatibility.
keyboardNavigationEnabled | false | false | `java.lang.String` | Enables keyboard support. Default value is true. When true it enables "up" and "down" arrow keys to set the focus on rows, as it was hovered by the mouse. Once row has a focus then it can be selected/deselected by hitting the "space" or "enter" key
mouseOverClass | false | false | `java.lang.String` | This method has been deprecated in 1.6. Please use the styleClass instead.
multiple | false | false | `java.lang.String` | When true, more then one row can be selected. Default is false.
preStyleOnSelection | false | false | `java.lang.String` | When the user (de)selects a row, there can be a latency with the network communication with the server, and the JSF lifecycle executing, before the client will be updated to depict the row selection. When preStyleOnSelection is true, the table row's styling will be updated immediately, improving the application's perceived responsiveness. When applications directly manage row selection, on the server side, to implement specific rules for (de)selection, they should see this to false, to avoid styling being set and reset. For backwards compatibility with such applications, the default value is false.
rendered | false | false | `java.lang.String` | Flag indicating whether or not this component should be rendered (during Render Response Phase), or processed on any subsequent form submit.
renderedOnUserRole | false | false | `java.lang.String` | If user is in given role, this component will be rendered normally. If not, nothing is rendered and the body of this tag will be skipped.
selectedClass | false | false | `java.lang.String` | This method has been deprecated in 1.6. Please use the styleClass instead.
selectedMouseOverClass | false | false | `java.lang.String` | This method has been deprecated in 1.6. Please use the styleClass instead.
selectionAction | false | false | `java.lang.String` | Action method to call when a row is clicked
selectionListener | false | false | `java.lang.String` | Listener method to call with a RowSelectorEvent when a row is (de)selected
singleRowAutoSelect | false | false | `java.lang.String` | When true selects rows automatically on arrow key events in single selection mode
styleClass | false | false | `java.lang.String` | Space-separated list of CSS style class(es) to be applied when this element is rendered. This value must be passed through as the "class" attribute on generated markup. Default value is iceRowSel: Style Classes Used: iceRowSelMouseOver iceRowSelSelected iceRowSelSelectedMouseOver
tabindex | false | false | `java.lang.String` | Position of this element in the tabbing order for the current document. This value must be an integer between 0 and 32767.
toggleOnClick | false | false | `java.lang.String` | Do row selection on mouse click. When false, row (de)selection will not happen when the user clicks on a table row. Default value is true.
toggleOnInput | false | false | `java.lang.String` | Do row selection, even when the user clicks on an input field or link in a table cell. Default value is true. When false, row (de)selection will not happen when the user clicks inside an input field, list, menu, button, or link.
value | false | false | `java.lang.String` | A ValueBinding to a per dataTable row java.lang.Boolean property, which determines if that row is selected. Typically the ValueBinding refers to a property of the dataTable's var attribute, but another strategy is to use a smart java.util.Map to centrally maintain the selection state.

Variables
| No Variables Defined.

Overview | Library | Tag | Help
| FRAMES NO FRAMES

Output Generated by Tag Library Documentation Generator. Java, JSP, and JavaServer Pages are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries. Copyright 2002-4 Sun Microsystems, Inc. 4150 Network Circle Santa Clara, CA 95054, U.S.A. All Rights Reserved.