The display of rows in a table can be restricted using the onFilter event.This can improve the overview of the information contained in a table.
The Table UI element provides the application developer with an interface for displaying a filter row. The filter row is displayed right below the column header area and does not change position when the user browses.
The filtering of table entries requires:
Restricting the Size of the Result List
Each table column enables you to bind itsfilterValueproperty to a context attribute that defines the value to be filtered. Due to the binding of this property to a context attribute, an input element, which can be used to enter the value to be filtered, is displayed in the column below the column header area.
Starting the Filter Process
The Table UI element provides theonFilterevent, which can be associated with an action. Due to the association with an action, the filter row is displayed in the table. The filter row contains the button as the first element on the left side. When the user chooses this button, the associated action is executed.
An input field is usually displayed for the filter cell. If you add a proposal list to an attribute, then a combo box is displayed, where the user can select or enter values. More information: Implementing a Combo Box . If you have a column with boolean values - for example, displayed using check boxes, you can use a TriStateCheckBox in the filter row by binding the respective filterValue to a context attribute of type WDTriState. More information: Binding UI Element Properties to Dictionary Types
The logic of the filter process is not implemented in Web Dynpro. The application developer must implement the action to be executed.
If you have implemented filtering without using the table's onFilterevent, you can use the isFiltered property to hold the column's filter status and to display the filter icon in the respective column's header.
If sorting is implemented, the user can sort single columns by clicking a header of a column. If it' is possible to sort multiple columns, the user can use this function by additionally holding the CTRL key pressed.
You can trigger a sorting process using the onSort event. This process can be used to sort in ascending or descending order after a selected table column. When you assign an action to the onSort event, the user can click the header of a column at runtime to display the corresponding icons.
ascending |
|
descending |
|
The property multiColSorting allows you to specify whether the user can sort more than one column. If set to true, the sort icon can be displayed in more than one header. The logic of the sorting process is not implemented in Web Dynpro. The application developer must implement the action to be executed.
You can find additional information and coding examples in SDN .