Desktop Components ShowcaseMobile Components Showcase
ace:dataTable - Row State

The row state example demonstrates some of the enhanced control functions associated with row selection, visibility and cell / row editability. Click on the desired Selection, Visibility, and Editability attributes, then click on the desired cell / row in the table. To demonstrate in-cell editing, select Enable Editing for All, select the desired row of the cell you wish to edit, then click the pencil icon associated with the row you wish to edit. The data table entries will become editable in place. Once finished, click the checkmark to confirm and update or the “x” under the Edit row to reject the changes.

The RowStateMap class implements Map<Object, RowState>, where the object used as key is the same data object used to populate the row. Because of this, when using these advanced features, like selection, editing, expansion, etc., it is necessary that the data object class implement custom hashCode() and equals() methods so that the correct RowState object be returned every time throughout multiple lifecycles, consistently. This is especially important when using these features in lazy loading mode.

Selection





Visibility



Editability




Editing




Currently Selected Rows
Selectable
Editable
Name
Weight
Accel
MPG
Cost
Edit
Enduro
15383lbs.
10
17.86
$6,617.17
Tamale
7331lbs.
15
16.65
$31,464.24
Doublecharge
5333lbs.
15
17.84
$10,922.73
Swordfish
10956lbs.
5
5.17
$6,019.83
Iguana
1696lbs.
10
9.43
$19,736.16
Dart
9261lbs.
15
12.85
$37,947.84
Pisces
7846lbs.
10
15.13
$19,235.20
Flash
11499lbs.
10
12.74
$29,942.38
Tomcat
10766lbs.
15
7.04
$14,342.74
Passion
2082lbs.
10
13.38
$8,015.01
false null [0, 1, 2, 3, 4, 5, 6, 7]
Source Code