Class zwt.ui.table.DefaultRowSorter
Extends
zwt.ui.table.RowSorter.
A row sorter provides default sorting using a table model. Basically a table requires a row sorter to map the row indices from the data model to the view.
This is the default implementation sorting the data model on the client side. You may want to provide different implementation to perform server-side sorting for instance.
Defined in: DefaultRowSorter.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Construct a default row sorter.
|
Method Attributes | Method Name and Description |
---|---|
rowDeleted(int_firstRow, int_firstRow)
Invoked when rows have been deleted from the model in the specified range (inclusive).
|
|
rowInserted(int_firstRow, int_firstRow)
Invoked when rows have been inserted from the model in the specified range (inclusive).
|
|
rowUpdated(int_firstRow, int_firstRow)
Invoked when rows have been updated from the model in the specified range (inclusive).
|
|
sort()
Sort the table using the table model.
|
- Methods borrowed from class zwt.ui.table.RowSorter:
- convertRowIndexToModel, convertRowIndexToView, getComparator, getRowSorterEventManager, getSortKeys, isSortable, onEvent, setComparator, setSortKeys, toggleSortOrder
Method Detail
rowDeleted(int_firstRow, int_firstRow)
Invoked when rows have been deleted from the model in the specified range (inclusive). This method is called before the change in the underlying model.
- Parameters:
- {Integer} int_firstRow
- The first row
- {Integer} int_firstRow
- The last row
rowInserted(int_firstRow, int_firstRow)
Invoked when rows have been inserted from the model in the specified range (inclusive). This method is called after the change in the underlying model.
- Parameters:
- {Integer} int_firstRow
- The first row
- {Integer} int_firstRow
- The last row
rowUpdated(int_firstRow, int_firstRow)
Invoked when rows have been updated from the model in the specified range (inclusive).
- Parameters:
- {Integer} int_firstRow
- The first row
- {Integer} int_firstRow
- The last row
sort()
Sort the table using the table model.
This method will actually creates two indices, one to map from the view to the model and one to map from the model to the view.