|
Event handling |
|
FacesTable component triggers the following types of events:
| • | TableRowsPerPageChangedEvent/Listener - triggered upon changing "Rows Per Page" combo inside the table navigation block. |
| • | TableSortSelectedEvent/Listener - triggered upon changing table sort criterion by clicking on the table header. |
| • | TableNavigationSelectedEvent/Listener - triggered upon clicking on any navigation links. |
| • | TableCellSelectedEvent/Listener - triggered upon clicking on any table cell. |
| • | TableCellDblClickedEvent/Listener - triggered upon double clicking on any table cell. |
| • | TableValueChangedEvent/Listener - triggered upon changing any value in any table cell. |
Note:
You can specify the columns which will be triggered with TableValueChanged, TableCellSelected and TableCellDblClicked events. Column object (tag) has TableValueChangedAction, TableCellSelectedAction and TableCellDblClickedAction attributes to manage necessary behaviour. Default values is true. This means that if user acts with any of cells within any column the events take place by default.
Set appropriate property to false if you don't want to generate event on necessary columns.
All these events can be easily handled by implementing TableRowsPerPageChangedListener, TableSortSelectedListener, TableCellSelectedListener, TableValueChangedListener, TableNavigationSelectedListener and TableCellDblClickedListener listeners accordingly.
See example of the custom tag usage on JSP page
Note:
serverSideAction tag property must be set to true. tableRowsPerPageChangedListener, tableSortSelectedListener, tableCellSelectedListener, tableNavigationSelectedListener,tableValueChangedListener tag properties must contain fully qualified class name of the corresponding listener implementation.