Description
The SortableHeader tag renders table headers that allow a user to see the current sort order and to resort the data.
Examples
<!-- A simple example that uses sortable headers. --> <thead> <tr> <th><tt:sortableHeader action="Table" name="sortColumnKey" title="Column 1" sortKey="col1" sortOrder="sortOrder" sortable="true" /></th> <th><tt:sortableHeader action="Table" name="sortColumnKey" title="Column 2" sortKey="col2" sortOrder="sortOrder" sortable="true" /></th> <th><tt:sortableHeader action="Table" name="sortColumnKey" title="Column 3" sortKey="col3" sortOrder="sortOrder" sortable="true" /></th> <th><tt:sortableHeader action="Table" name="sortColumnKey" title="Column 4" sortKey="col4" sortOrder="sortOrder" sortable="true" /></th> <th><tt:sortableHeader action="Table" name="sortColumnKey" title="Column 5" sortKey="col5" sortOrder="sortOrder" sortable="true" /></th> </tr> </thead> ...
Parameters
Name |
Description |
---|---|
sortKey |
the column key used to determine if the currently selected column |
sortOrder |
the action property name of the sort order |
sortable |
Whether or not the user should be allowed to sort the column |